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

  • Thread starter Thread starter iqjump123
  • Start date Start date
  • Tags Tags
    Mathematica Ode
Click For Summary

Homework Help Overview

The discussion revolves around solving a second-order equidimensional non-homogeneous ordinary differential equation (ODE) given by x^2 y''(x) - 2 x y'(x) + 2 y(x) = x^2 + 2. Participants explore various methods for obtaining the general solution, including the Euler-Cauchy method and variation of parameters.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • The original poster attempts to use the method of undetermined coefficients but encounters difficulties, leading to the use of variation of parameters. Questions arise regarding the validity of their approach and the discrepancies between their solution and that obtained from Wolfram Alpha.

Discussion Status

Participants are actively discussing the differences in solutions obtained through manual calculations and computational tools. Some express assurance in their findings after receiving confirmation from others, while questions about the appropriateness of different methods are raised. There is no explicit consensus on the best approach, but productive dialogue is ongoing.

Contextual Notes

Participants note the specific methods mentioned in the problem statement and question the original poster's initial choice of method. There is an acknowledgment of the conditions under which certain methods can be applied, particularly regarding the method of undetermined coefficients.

iqjump123
Messages
58
Reaction score
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
Maybe you typed the problem into Wolfram Alpha incorrectly. Mathematica gives me the same solution you found by hand.
 
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 :)
 
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.
 
*facepalm*
 
vela said:
*facepalm*
Come on vela. You didn't actually say that the WolframAlpha answer was wrong. You merely confirmed OP's solution.
 
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"?
 
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.
 
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:)
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
8
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
7
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K