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: Diff eq problem appears simple but is deadly

  1. Sep 30, 2010 #1
    1. Given i. dx/dt + y = 0; x(0) = 1 : ii. dy/dt + x = 0; y(0) = 0 Solve for the solns of x and y

    Although these are first order dif eq's I worked them as leading to a second order undetermined coefficients problem

    First I wrote them as
    i. x' + y = 0 and ii. y' + x = 0

    Eqn. ii leads to y' = -x and this to y'' = -x' => -y" = x' substitute back in i. for -y" + y = 0

    => -y" + 0y' + y = 0 now to solve i in it's new form of a 2nd order eqn.
    I began by writing as y" -0y'-y=0 and if std form is y''+ay'+by then a=0, b=-1 and a^2 = 0 4b = -4 => a^2 >4b and soln is form of x=C1e^-r1x + C2e^r2x the values for r1 and r2 are calculated from y" + 0y' + y = 0 or r^2 - 1 =0 so r = +/- 1. the soln then becomes x = C1e^x + C2e^-x. Now applying initial value conditions x(0) = 1 => 1 = C1 + C2

    I then complete the other half of the problem similarly and end with 0 = C1 + C2

    and I'm stuck. Can someone please point out where I'm going wrong?

  2. jcsd
  3. Sep 30, 2010 #2


    Staff: Mentor

    You're on the right track but the clump of stuff above is kind of a mess. You're solving y'' - y = 0, so the solution would be y = c1et + c2e-t.

    x and y are dependent variables and t is the independent variable.

    Edit: Misread the initial condition for y.
    Use your initial condition y(0) = 0 to get an equation involving c1 and c2.

    After doing that, solve for x, which you show as being equal to -y'. When you get x, use the initial condition x(0) = 1 to get another equation involving c1 and c2.

    Last edited: Sep 30, 2010
  4. Sep 30, 2010 #3
    My first reaction to this part

    "the soln then becomes x = C1e^x + C2e^-x. Now applying initial value conditions x(0) = 1 => 1 = C1 + C2"

    is that you were solving from y, but switched to x in the end. Also your independent variable should be t (since the differential is dy/dt). It looked good up to here. You should have

    y=C1e^t + C2e^-t , with y(0)=0
  5. Sep 30, 2010 #4
    Hi sorry for the text jumble...I've managed to pdf and attach my working. Can ayone figure out where I'm going wrong?. Thanks

    Attached Files:

  6. Sep 30, 2010 #5


    User Avatar
    Science Advisor

    You have correctly determined that [itex]y= C_1e^t+ C_2e^{-t}[/itex]. From the initial condition, [itex]y(0)= C_1+ C_2= 0[/itex]. You then go back and solve the corresponding differential equation for x and get the same thing, [itex]x= C_1e^t+ C_2e^{-t}[/itex], for which the initial condition gives [itex]C_1+ C_2= 1[/itex] and, obviously, those cannot both be true. The problem is that you have no reason to think that the "[itex]C_1[/itex]" and "[itex]C_2[/itex]" constants in the two different solution are the same! But if you write [itex]y= C_1e^t+ C_2e^{-t}[/itex] and [itex]x= D_1e^t+ D_2e^{-t}[/itex] you have four unknown constants and only two conditions to determine them!

    Answer: once you have [itex]y= C_1e^{t}+ C_2e^{-t}[/itex], do not solve another differential equation for x. Instead use the second equation, dy/dt+ x= 0 to find [itex]x= -dy/dt= C_1e^{t}- C_2e^t[/itex].

    Now you have [itex]y(0)= C_1+ C_2= 0[/itex] and [itex]x(0)= C_1- C_2= 1[/itex] to solve for [itex]C_1[/itex] and [itex]C_2[/itex].
  7. Sep 30, 2010 #6


    Staff: Mentor

    You have y = c1et + c2e-t, and with the initial condition, you get 0 = c1 + c2.

    Since y' = - x or equivalently, x = -y', differentiate the equation you have for y and take its negative to get your equation for x. Substitute in your initial condition x(0) = 1 to get a second equation for the constants c1 and c2.
  8. Sep 30, 2010 #7
    Thanks for the responses...as a follow up to HallsofIvy - the crux of the solution was deciding how to proceed after solving the first diff eq. - I'm still not clear on what led you to determine that solving the second diff eq for x was not the right way to proceed. Would you have made the same decision w/o knowing that the solution of the dx/dt eqn led to a impossible answer?. In other words would you have to work the problem to a dead end before realizing that another avenue was needed?. Cheers
  9. Sep 30, 2010 #8
    The primary reason for not solving the second differential equation is that it's unnecessary, and trying to do so will create more work/problems. The purpose of doing so would be to find "x=something", but in the problem statement you are given x=-dy/dt. You already know y, so (in general) differentiating it isn't much work.
  10. Sep 30, 2010 #9
    Aha!... I never thought to look at it in that context... just saw the eqn. and started solving "a mile a minute"...thanks for your insight!... Cheers
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook