1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Change of variables in a differential equation

  1. Jan 4, 2017 #1
    1. The problem statement, all variables and given/known data

    Transform the equation:

    x2 * d2y/dx2 + 2 * x * dy/dx + (a2/x2)*y = 0



    2. Relevant equations

    The differential of a function of several variables, and the common rules of differentiation.


    3. The attempt at a solution

    As I have x as function of t I can calculate dx as function of t and dt. So:

    dx = (-1/t2)* dt , equation 1

    d2x = (2/t3)*dt2, equation 2 (I considered d2t=0 because it is the independent variable)

    To calculate dy/dx I symply change dx by its value at equation 1 , so I get:

    dy/dx= dy/ (-1/t2)*dt = -t2 * (dy/dt)

    (According to the book this is correct)

    Now the problem is d2y/dx2

    1.- First question, Why is it a mistake to simply substitute dx2 for its value calculated in equation 2?

    2.- According to the book I have to differenciate dy/dx which was equal to:

    -t2 dy/dt

    I do it simply calculating the differential of a product:

    (-2 * t * dt )* dy/dt -t2 * d2y/dt

    (I didn't differenciate dt, I assume d2t =0)

    Simply dividing this value by dt I get what I expected to be the right result:

    (-2*t) * dy/dt -t2 * d2y/dt2

    But according to the book, this is wrong, I am missing a term arising from dx/dt.

    This is what the book does:

    d2y/dx2 = step 1 = d/dx (dy/dx) = step 2 = (d/dt ( dy/dx))/ ( dx/dt ) to get this result:

    - ( 2t dy/dt +t2 * d2y/dt2)(-t2)

    I understand the step 1 it simply says that the second derivative is the derivative of the first derivative, but the step 2 is a mistery to me and it is the step that creates the term I am missing that is the dx/dt in the denominator. I try to differenciate thinking in terms of differentials, so I can manipulate them in the expressions like they were algebraic quantities, maybe I don't understand the operator version of the derivative.

    The last term -t2 is what I didn't get in my calculation.

    2.- Question two, in my previous calculation using differentials, Where I missed the dx/dt term?
  2. jcsd
  3. Jan 4, 2017 #2


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Differentiate to x, not to t !
  4. Jan 4, 2017 #3
    I don't get it, if I differenciate dy/dx to x I get d2y/dx2 right? But I am looking for d2y/dt2
  5. Jan 4, 2017 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Chain rule!
    $$ \frac{dy}{dt} = \frac{dy}{dx} \frac{dx}{dt},$$
  6. Jan 4, 2017 #5


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    It's probably best to avoid using differentials here.

    For a test function ##f##, the chain rule tells us that
    $$\frac{df}{dx} = \frac{dt}{dx} \frac{df}{dt}.$$ In terms of operators, we'd say that
    $$\frac{d}{dx} = \frac{dt}{dx} \frac{d}{dt}.$$
    To calculate ##dy/dx## then, we'd have
    $$\frac{d}{dx} y = \left(\frac{dt}{dx} \frac{d}{dt}\right) y = \frac{dt}{dx} \frac{dy}{dt},$$
    and for the second derivative, we'd get
    \frac{d}{dx} \left(\frac{d}{dx} y\right) &= \left(\frac{dt}{dx} \frac{d}{dt}\right) \left( \frac{dt}{dx} \frac{d}{dt} \right) y \\
    &= \left(\frac{dt}{dx} \frac{d}{dt}\right) \left( \frac{dt}{dx} \frac{dy}{dt} \right) \\
    &= \frac{dt}{dx} \left[\left(\frac{d}{dt}\frac{dt}{dx}\right) \frac{dy}{dt} + \frac{dt}{dx} \frac{d}{dt} \left( \frac{dy}{dt} \right) \right]
  7. Jan 4, 2017 #6


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You calculated ##\frac{d}{dt}\left(\frac{dy}{dx}\right)##, but you appear to want ##\frac{d^2 y}{dt^2} = \frac{d}{dt}\left(\frac{dy}{dt}\right).## What you actually want is ##d^2 y/dx^2## in terms of ##y##, ##dy/dt##, and ##d^2y/dt^2## to substitute into the original differential equation.
  8. Jan 4, 2017 #7
    Thanks folks, now I see it.
  9. Jan 5, 2017 #8
    Well, I have tried it hard but I don't get the right result.

    d. will mean "the differential of"

    So we have:

    dy/dt = dy/dx * dx/dt

    And I want to differenciate it, an infinitesimal change on t will change dy and dx, so let's calculate it:

    d. (dy/dt) = d. (dy/dx * dx/dt)

    I regard dt2 as equal to 0 since it is the independent variable.

    d2y/dt = d.(dy/dx) * dx/dt + d. (dx/dt) * dy/dx

    I apply the quotient rule for dy/dx so I get:

    ((dx * d2y - d2x * dy )/dx2)

    So we have this expression:

    d2y/dt= ((dx * d2y - d2x * dy )/dx2) * dx/dt +d2x/dt * dy/dx

    d2y/dt= (d2y/dx2) * (dx/dt) * dx - (dx/dt)* (d2x/dx2) *dy + (dy/dx) * (d2x/dt)

    Now I calculate d2x/dx2, which is a second order differential divided by the square of the first order differential. As we know that x=1/t I get for this quotient 2t.

    Now I divide the whole equation by dt, so finally I get:

    d2y/dt2= (d2y/dx2) * (dx/dt) * (dx/dt) - (dx/dt)* (2t) *(dy/dt) + (dy/dx) * (d2x/dt^2)

    Now I need to substitute the derivatives of x over t, eliminate dy/dx which was known from the start, and get d2y/dx2 as function of derivatives respect to t.

    I use:

    dx/dt= -1/t2

    d2x/dt2 = 2/t^3

    dy/dx = -t2 * dy/dt

    d2y/dt2= (d2y/dx2) * (1/t4) - (-1/t2)* (2t) *(dy/dt) + (-t2 * dy/dt) * (2/t3)

    The last two terms cancel out and I only get this result:

    d2y/dt2= (d2y/dx2) * (1/t4)

    Which is partially correct, but I failed to get an extra term since according to the book the right result is:

    d2y/dx2 = 2t3 * dy/dt + t4 * d2y/dt2

    So folks, Where is my mistake? Is there a fundamental conceptual problem differentiating? Or is it a small mistake somewhere?

    I apologize for my lack of understanding.
  10. Jan 5, 2017 #9


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    You can't. You also cannot ignore dx2 in the original differential equation.

    Did you read Vela's #5 and #6 ? What is the reason you ignore those ?
  11. Jan 5, 2017 #10


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    dy/dx is not a quotient. It is a differential quotient.
    You should get ##\displaystyle {d^2y\over dx^2} dx ## because ##\displaystyle{d\over dx}\left (\displaystyle{dy\over dx} \right ) = \displaystyle{d^2 y\over dx^2}##
  12. Jan 5, 2017 #11
    I didn't ignore, its just I read Euler Calculi differentialis and is the way I know to differenciate. I wanted to check if I got the right result but apparently I got it totally wrong and this was a disaster.
  13. Jan 5, 2017 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Perhaps it would be better to eliminate the "differential" signs, and write the original DE as
    $$x^2 y''(x) + 2 x y'(x) +\frac{a^2}{x^2} y(x) = 0$$.
    You want to change variables to ##Y(t) = \left. y(x) \right|_{x=1/t} = y(1/t)##.

    The chain rule gives you
    $$Y'(t) = \left. y'(x) \right|_{x=1/t} \: \cdot \frac{d}{dt} \frac{1}{t} = -\frac{1}{t^2} y'(1/t)$$.
    In a similar way you can get ##Y''(t) = (d/dt) Y'(t)## in terms of ##y'(x)## and ##y''(x)##, evaluated at ##x = 1/t##.
  14. Jan 5, 2017 #13


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Not totally wrong, no disaster: the dx * d2y /dx2 is there alright !

    So far, the step to get ##\displaystyle {dy\over dx} ## in terms of ##t## has been successful. Next step is to get ##\displaystyle {d^2 y\over dx^2 }## using a similar procedure. As Ray says (and Vela and ..). Give it a try. ##\displaystyle {d^2 y\over dt^2 }## will pop up, don't worry.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted