How should I deal with the expression \frac{d}{dx} (\frac{dx}{dy}) ?

  • Level: Graduate 
  • Thread starter Thread starter bsdz
  • Start date Start date
  • Tags Tags
    Change Pde Variable
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
4 replies · 4K views
bsdz
Messages
5
Reaction score
0
Hi

I have a question regarding a PDE and change of variable. I can follow through the algebra but I have a problem deciding what route to take after I use the chain rule at a later point.

I have an expression: -

[tex]\frac{\partial^2 f}{\partial y^2}[/tex]

and would like to make the variable substitution: -

[tex]y = k e^x[/tex]

I first note that ,

[tex]\frac{dy}{dx} = k e^{x}[/tex]

and

[tex]\frac{d^n y}{dx^n} = k e^{x} \; \forall n \ge 0[/tex]

This is my initial calculation: -

[tex]\frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y} \frac{\partial f}{\partial y} = \frac{\partial}{\partial y}( \frac{\partial f}{\partial x} \frac{\partial x}{\partial y})[/tex]

[tex]= \frac{d x}{d y} \frac{d^2 f}{dy d x} + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

[tex]= \frac{d x}{d y} \frac{d}{dx}(\frac{df}{dy}) + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

[tex]= \frac{d x}{d y} \frac{d}{dx}(\frac{df}{dx} \frac{dx}{dy}) + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

[tex]= \frac{d x}{d y} (\frac{d^2f}{dx^2} \frac{dx}{dy} + \frac{df}{dx} \frac{d}{dx} (\frac{dx}{dy}) ) + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

However at this point I have two options on how I deal with the expression: -

[tex]\frac{d}{dx} (\frac{dx}{dy})[/tex]

Option 1 is to substitute and deal with it in-line: -

[tex]= \frac{1}{ke^x} (\frac{d^2f}{dx^2} \frac{1}{ke^x} + \frac{df}{dx} \frac{d}{dx} (\frac{1}{ke^x}) ) + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

and note that,

[tex]\frac{dx}{dy} = \frac{1}{y} \Rightarrow \frac{d^2 x}{dy^2} = \frac{-1}{y^2} = \frac{-1}{(k e^x)^2}[/tex]

[tex]= \frac{1}{ke^x} (\frac{d^2f}{dx^2} \frac{1}{ke^x} + \frac{df}{dx} \frac{d}{dx} (\frac{1}{ke^x}) ) + \frac{d f}{d x} \frac{-1}{(k e^x)^2}[/tex]

[tex]= \frac{1}{ke^x} (\frac{d^2f}{dx^2} \frac{1}{ke^x} + \frac{df}{dx} (\frac{-1}{ke^x}) ) + \frac{d f}{d x} \frac{-1}{(k e^x)^2}[/tex]

[tex]= \frac{1}{(ke^x)^2} (\frac{d^2f}{dx^2} - 2 \frac{df}{dx})[/tex]

or Option 2 is to evaluate it to zero: -

[tex]= \frac{1}{ke^x} (\frac{d^2f}{dx^2} \frac{1}{ke^x} + \frac{df}{dx} \frac{d}{dy} (\frac{dx}{dx}) ) + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

[tex]= \frac{1}{ke^x} (\frac{d^2f}{dx^2} \frac{1}{ke^x} + \frac{df}{dx} \frac{d}{dy} (1) ) + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

[tex]= \frac{1}{ke^x} (\frac{d^2f}{dx^2} \frac{1}{ke^x} + 0 ) + \frac{d f}{d x} \frac{d^2 x}{d y^2}[/tex]

[tex]= \frac{1}{(ke^x)^2} (\frac{d^2f}{dx^2} - \frac{df}{dx})[/tex]

How should I consider this? Perhaps I am wrong all the way? Should I take it from first principles and use a limit definition?

Blair
 
Physics news on Phys.org
Now, quitting the complicating use of partials, let us focus on three functions, f(y), F(x), X(y), so that we have the identity:
[tex]f(y)=F(x=X(y))[/tex]
Now, we have:
[tex]\frac{df}{dy}=\frac{dF}{dx}\frac{dX}{dy}[/tex]
We then have:
[tex]\frac{d^{2}f}{dy^{2}}=\frac{d^{2}F}{dx^{2}}(\frac{dX}{dy})^{2}+\frac{dF}{dx}\frac{d^{2}X}{dy^{2}}[/tex]
Now, from what you wrote, we have:
[tex]X(y)=\ln(y)-\ln(k)[/tex]
Thus, we have:
[tex]\frac{dX}{dy}=\frac{1}{y}=\frac{1}{k}e^{-x},\frac{d^{2}X}{dy^{2}}=-\frac{1}{y^{2}}=-\frac{1}{k^{2}}e^{-2x}[/tex]
Thus, having eliminated the y's, and re-defining F(x) as f(x) (a notational abuse, but very convenient!), we get:
[tex]\frac{d^{2}f}{dy^{2}}=\frac{1}{k^{2}}e^{-2x}(\frac{d^{2}f}{dx^{2}}-\frac{df}{dx})[/tex] whenever x and y are related through the equation x=X(y)
 
Thanks. That confirms option 2. I am developing a software library that automates changing of variables so sadly I can't easily quit using partials. However, I would be interested in any other algorithmic way of doing this that will work with most/all PDE/ODEs.

arildno said:
Now, quitting the complicating use of partials, let us focus on three functions, f(y), F(x), X(y), so that we have the identity:
[tex]f(y)=F(x=X(y))[/tex]
Now, we have:
[tex]\frac{df}{dy}=\frac{dF}{dx}\frac{dX}{dy}[/tex]
We then have:
[tex]\frac{d^{2}f}{dy^{2}}=\frac{d^{2}F}{dx^{2}}(\frac{dX}{dy})^{2}+\frac{dF}{dx}\frac{d^{2}X}{dy^{2}}[/tex]
Now, from what you wrote, we have:
[tex]X(y)=\ln(y)-\ln(k)[/tex]
Thus, we have:
[tex]\frac{dX}{dy}=\frac{1}{y}=\frac{1}{k}e^{-x},\frac{d^{2}X}{dy^{2}}=-\frac{1}{y^{2}}=-\frac{1}{k^{2}}e^{-2x}[/tex]
Thus, having eliminated the y's, and re-defining F(x) as f(x) (a notational abuse, but very convenient!), we get:
[tex]\frac{d^{2}f}{dy^{2}}=\frac{1}{k^{2}}e^{-2x}(\frac{d^{2}f}{dx^{2}}-\frac{df}{dx})[/tex] whenever x and y are related through the equation x=X(y)
 
Well, it isn't at all difficult to tweak this into partials notation.
 
In that case, it would look near identical to my original calculation and option 2.

Thanks.