From: Alois Steindl on
Zsolt <phyhari(a)gmail.com> writes:

> Hi!
> I tried solve the ODE:
> DSolve[D[y[x], x, x] == -Cos[x]/(1 + Sin[x])^2, y[x], x]
>
> The solution what M7 (and Wolfram Alpha) gives is:
> y[x] -> C[1] + x C[2] + (2 Sin[x/2])/(Cos[x/2] + Sin[x/2])
>
> I think, it's wrong! (Does anybody know how to check?)
Hello,
what makes you think, that this solution is wrong?
You should know, that the same function can often be written in many
different ways.

To check the solution, you could simply compare the plots of its 2nd derivative
and the right hand side of the ODE or use TrigExpand[] on both functions
and their difference.

Alois

From: DrMajorBob on
Actually, the difference is a constant plus another constant times x.

Bobby

On Tue, 05 Jan 2010 00:42:00 -0600, Tony Harker <a.harker(a)ucl.ac.uk> wrote:

> Let Mathematica check it:
>
> eq = D[y[x], x, x] == -Cos[x]/(1 + Sin[x])^2
> sol = DSolve[eq, y, x]
> eq /. sol[[1]] // Simplify
>
> returns True.
>
> So the solution is correct, and if you think about it the difference
> between Mathematica's solution and the other one is only a matter of a
> difference in the additive constant.
>
> Tony
>
> ]-> -----Original Message-----
> ]-> From: Zsolt [mailto:phyhari(a)gmail.com]
> ]-> Sent: 04 January 2010 10:59
> ]-> To: mathgroup(a)smc.vnet.net
> ]-> Subject: Wrong ODE solution in Mathematica 7?
> ]->
> ]-> Hi!
> ]-> I tried solve the ODE:
> ]-> DSolve[D[y[x], x, x] == -Cos[x]/(1 + Sin[x])^2, y[x], x]
> ]->
> ]-> The solution what M7 (and Wolfram Alpha) gives is:
> ]-> y[x] -> C[1] + x C[2] + (2 Sin[x/2])/(Cos[x/2] + Sin[x/2])
> ]->
> ]-> I think, it's wrong! (Does anybody know how to check?)
> ]-> Another system gives for the same diff.eq:
> ]-> y(x) = -2/(tan((1/2)*x)+1)+_C1*x+_C2
> ]-> (similar, but not the same->ctan vs tan...) I found the
> ]-> problem in one of my math books, and the solution there
> ]-> concours with the other system.
> ]-> How can I trust Mathematica, if it makes mistakes in such
> ]-> simple things?? :( Thank you for your answer! :)
> ]->
> ]->
>
>


--
DrMajorBob(a)yahoo.com