Solving xy' + 2y = sqrt(1 + x^2)

  • Thread starter cscott
  • Start date
In summary: I know simplification can be hard and I didnt mean to imply that anyone is lazy.In summary, Maple can't simplify a big long mess that it generates. However, simplification can be done by hand using 'dsolve'.
  • #1
cscott
782
1

Homework Statement



Solve xy' + 2y = sqrt(1 + x^2)

Homework Equations



I got an integrating factor of [itex]x^2[/itex]

So [tex]y = 1/x^2 \int{x\sqrt{1 + x^2}}[/tex]

The Attempt at a Solution



and I get [tex]y =\frac{(1 + x^2)^{3/2}}{3x^2}[/tex] for C = 0

But this wrong when I substitute it in ... what'd I do wrong?
 
Last edited:
Physics news on Phys.org
  • #2
How would I solve this in Maple? When I do and try it's answer it seems wrong as well... it tells me [itex]2y = \sqrt(1+x^2)[/tex]
 
  • #3
It is wrong because you have multiplied the sqruare root expression with x^2, rather than with just x:

[tex]xy'+2y=\sqrt{1+x^{2}}\to{x}^{2}y'+2xy=x\sqrt{1+x^{2}}\to(x^{2}y)'=x\sqrt{1+x^{2}}[/tex]
And so on..
 
  • #4
sorry, I that was a typo... with [itex]x\sqrt{1 + x^2}[/itex] you get the y as above. (at least I do... on my calculator too) but when I substitute for y into the LHS it doesn't equal [itex]\sqrt{1+x^2}[/itex]
 
  • #5
I just used the Maple packaged with Matlab.

>> syms x y C1

>> ysoln = dsolve('x*Dy+2*y=sqrt(1+x^2)','x')
ysoln = (1/3*(1+x^2)^(3/2)+C1)/x^2

>> x*diff(ysoln,x)+2*ysoln-sqrt(1+x^2)
ans = A big awful mess

>> pretty(simple(ans))
0

In other words, the answer you got in the original post is correct.

Moral: Sometimes Maple (or Mathematica) create a big long mess. Simplification cleans it up, sometimes (as it did in this case).

Usually when I use Maple I am left with a big long mess that Maple can't simplify. I use Maple to check my hand work for stupid errors.
>>mysoln = some simple equation;
>>maplesoln = some big long mess;
>>zerocheck = simple(mysoln-maplesoln)
Maple doesn't make the stupid mistakes I am quite prone to make. On the other hand, Maple is quite stupid about simplifying things.
 
Last edited:
  • #6
I agree with DH that 'dsolve' is a good tool to use to solve these diffs on maple.
There are also a lot of great tools in maple to simplify answers. If all your getting on maple are big nasty answers, your not using it right.
read up on 'simplify' ,'factor', and 'collect', those are the 3 most common tools i use
 
  • #7
Thanks... for the tips too!
 
  • #8
joob said:
There are also a lot of great tools in maple to simplify answers. If all your getting on maple are big nasty answers, your not using it right.
read up on 'simplify' ,'factor', and 'collect', those are the 3 most common tools i use

Don't be insulting. Those tools only go so far. The bottom line is that simplification is not particularly well-defined and is definitely not easy (it is an NP-hard problem). I have run across many problems that neither Maple nor Mathematica can simplify as well as a human can. I have seen many, many more examples in autogenerated code (no human would write a multi-page equation).
 
  • #9
Sorry, I didnt mean to sound insulting.
 

What is the equation xy' + 2y = sqrt(1 + x^2)?

The equation xy' + 2y = sqrt(1 + x^2) is a first-order linear differential equation that involves a function y and its derivative y'.

What is the purpose of solving this equation?

Solving this equation can help us find the function y that satisfies the given conditions. This can be useful in many applications, such as modeling physical systems or predicting future outcomes.

What are the steps to solve this equation?

The steps to solve this equation involve separating the variables, integrating both sides, and solving for y. It may also involve using certain techniques such as substitution or integration by parts.

What are the initial conditions for this equation?

The initial conditions refer to the specific values of x and y that satisfy the equation. These values are usually given in the problem and are used to find the particular solution to the differential equation.

What are some real-world applications of this equation?

This equation can be used to model various physical phenomena, such as exponential growth or decay, radioactive decay, and heat transfer. It can also be applied in economics, biology, and engineering, among other fields.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
543
  • Calculus and Beyond Homework Help
Replies
14
Views
202
  • Calculus and Beyond Homework Help
Replies
2
Views
531
  • Calculus and Beyond Homework Help
Replies
1
Views
483
  • Calculus and Beyond Homework Help
Replies
2
Views
497
  • Calculus and Beyond Homework Help
Replies
10
Views
418
  • Calculus and Beyond Homework Help
Replies
5
Views
532
  • Calculus and Beyond Homework Help
Replies
1
Views
454
  • Calculus and Beyond Homework Help
Replies
14
Views
632
  • Calculus and Beyond Homework Help
Replies
8
Views
865
Back
Top