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!

Checking answer vs. mathematica (2nd order equidimensional non homog. ODE)

  1. Aug 17, 2011 #1
    1. The problem statement, all variables and given/known data

    Obtain general solution:

    x^2 y''(x)-2 x y'(x)+2 y(x) = x^2+2

    2. Relevant equations

    Using Euler Cauchy method, and using variation of parameters

    3. The attempt at a solution

    Hey all, I have been struggling with this problem since yesterday in obtaining the particular solution.

    First of all, I thought I could use the method of undetermined coefficients, and made the guess as yp=(Ax2+Bx+C)*x (since the initial guess includes the complimentary solution), but noticed everything just goes to 0.

    So I used the Variation of Parameters method. The answer I obtained was:
    y(x) = c_2 x^2+c_1 x+x^2 log(x)+1-x^2.

    However, when I tried solving this DE in wolfram alpha, it gave me
    y(x) = c_2 x^2+c_1 x+x^2 log(x)+1. (no x^2 term)

    i tried solving this back and forth and rechecking my answer to see what my problem is, but I can't see what is wrong.

    Any insight will be helpful!

    Thanks so much, as always :)

    iqjump123
     
  2. jcsd
  3. Aug 17, 2011 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Maybe you typed the problem into Wolfram Alpha incorrectly. Mathematica gives me the same solution you found by hand.
     
  4. Aug 17, 2011 #3
    Thanks for the *lightning fast* reply, vela!
    I will go ahead and check it out- but i think the fact that you got the same answer gives me assurance :)
     
  5. Aug 17, 2011 #4

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    The solutions are the same. The constant c2 is different in the two solutions.

    In the WolframAlpha solution, call it C2' .

    Then let C2' = c2 - 1, where c2 refers to the answer you obtained.

    So basically, c2x2 of the WolframAlpha solution has absorbed c2x2 - x2 of your solution.
     
  6. Aug 17, 2011 #5

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    *facepalm*
     
  7. Aug 17, 2011 #6

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Come on vela. You didn't actually say that the WolframAlpha answer was wrong. You merely confirmed OP's solution.
     
  8. Aug 18, 2011 #7

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Since, according to you, the problem specifically says "Using Euler Cauchy method, and using variation of parameters", why do you then say "I thought I could use the method of undetermined coefficients"?
     
  9. Aug 18, 2011 #8
    First of all, vela- may I ask why you "facepalm"ed?

    Second, HallsofIvy, I mentioned the question as such, because I ended up using variation of parameters, but I thought I could use the method of undetermined coefficients.
    After all, using the method of u. c. is an easier alternative if the non homogenous solution is in the standard form. I was merely asking for some insight on if the reason I couldn't use MUC (If I can't)?

    thanks.
     
  10. Aug 18, 2011 #9

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    I should've noticed the two solutions were actually the same, just written differently.

    As far as I know, the method of undetermined coefficients only works when the DE has constant coefficients.
     
  11. Aug 18, 2011 #10
    I thought you were facepalming to my reaction lol. Anyways- good point about the conditions on using m.u.c- it actually seems that v of p is the way that works.

    Thanks to all who contributed:)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Checking answer vs. mathematica (2nd order equidimensional non homog. ODE)
Loading...