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

In summary, the person is struggling with a homework problem and is asking for help. They say that they first thought that they could use the method of undetermined coefficients, but found that it didn't work. They then used the variation of parameters method and found that the answer was y(x) = c_2 x^2+c_1 x+x^2 log(x)+1-x^2. However, when they tried to solve this using Wolfram Alpha, it gave them a different answer y(x) = c_2 x^2+c_1 x+x^2 log(x)+1. They are still unsure of what the problem is. Some insight on the problem would be helpful.
  • #1
iqjump123
61
0

Homework Statement



Obtain general solution:

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

Homework Equations



Using Euler Cauchy method, and using variation of parameters

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
 
Physics news on Phys.org
  • #2
Maybe you typed the problem into Wolfram Alpha incorrectly. Mathematica gives me the same solution you found by hand.
 
  • #3
vela said:
Maybe you typed the problem into Wolfram Alpha incorrectly. Mathematica gives me the same solution you found by hand.

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 :)
 
  • #4
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.
 
  • #5
*facepalm*
 
  • #6
vela said:
*facepalm*
Come on vela. You didn't actually say that the WolframAlpha answer was wrong. You merely confirmed OP's solution.
 
  • #7
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"?
 
  • #8
HallsofIvy said:
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"?

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.
 
  • #9
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.
 
  • #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:)
 

1. How accurate are the results from checking my answer with Mathematica?

The accuracy of the results depends on the complexity of the second-order equidimensional non-homogeneous ODE and the precision settings used in Mathematica. In general, Mathematica is a highly reliable software and will provide accurate results.

2. Can I trust Mathematica to solve all types of second-order equidimensional non-homogeneous ODEs?

Mathematica has a wide range of built-in functions and algorithms for solving various types of ODEs. However, there may be some cases where the equation is too complex or the initial/boundary conditions are not well-defined, in which case Mathematica may not be able to find a solution.

3. How can I check my answer with Mathematica if I don't have access to the software?

If you do not have access to Mathematica, you can use other online ODE solvers or manually solve the equation using analytical techniques to compare your solution with the results from Mathematica.

4. Will checking my answer with Mathematica save me time in solving the equation?

Yes, using Mathematica can save you time in solving the equation as it has advanced algorithms and functions specifically designed for solving ODEs. However, it is always important to understand the steps and processes involved in solving the equation to ensure accuracy.

5. Are there any limitations to using Mathematica to check my answer for second-order equidimensional non-homogeneous ODEs?

There may be some limitations depending on the complexity of the equation and the initial/boundary conditions. In some cases, Mathematica may not be able to find a closed-form solution and may only provide a numerical solution. It is important to understand the limitations of the software and double-check the results for accuracy.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
505
  • Calculus and Beyond Homework Help
Replies
5
Views
296
  • Calculus and Beyond Homework Help
Replies
2
Views
200
  • Calculus and Beyond Homework Help
Replies
8
Views
242
  • Calculus and Beyond Homework Help
Replies
8
Views
804
  • Calculus and Beyond Homework Help
Replies
1
Views
292
  • Calculus and Beyond Homework Help
Replies
7
Views
710
  • Calculus and Beyond Homework Help
Replies
2
Views
529
Replies
3
Views
795
  • Calculus and Beyond Homework Help
Replies
1
Views
831
Back
Top