       DSolve second order ODE wrong solution

• To: mathgroup at smc.vnet.net
• Subject: [mg115009] DSolve second order ODE wrong solution
• From: Alberto Verga <Alberto.Verga at laposte.net>
• Date: Tue, 28 Dec 2010 06:50:11 -0500 (EST)

```DSolve[] fails solving this second order, constant coefficients,
differential equation:

In:=
deq = D[f[x], {x, 2}] + 2 D[f[x], x] + (1 + a^2) f[x] == 0
Out=
(1 + a^2) f[x] +  2 Derivative[f][x] + (f^\[Prime]\[Prime])[x] == 0

In:=
sol = DSolve[deq, f, x]
Out=
{{f -> Function[{x}, C Cos[(I + a) x] + C Sin[(-I + a) x]]}}

In:=
deq /. sol // FullSimplify
Out=
{E^(x - I a x) ((-I + a) E^(2 I a x) C + C - I a C) == 0}

The correct result is,
In:=
correct = {f -> Function[x, c Exp[-I (-I + a) x] + c Exp[I (I +
a) x]]}
Out=
{f -> Function[x, c Exp[-I (-I + a) x] + c Exp[I (I + a) x]]}

In:=
deq /. correct // FullSimplify
Out=
True

or equivalently:
In:= correct1 = {f -> Function[x, c Exp[-x] Sin[a x + c]]}
Out= {f -> Function[x, c Exp[-x] Sin[a x + c]]}
In:= deq /. correct1 // FullSimplify
Out= True

However, changing the coefficient 1+a^2=b, gives
In:=
deqb = D[f[x], {x, 2}] + 2 D[f[x], x] + b f[x] == 0;
solb = DSolve[deqb, f, x];
deqb /. solb // FullSimplify

Out=
{True}

Thanks!

```

• Prev by Date: Re: bibtex support in Mathematica 8
• Next by Date: Re; newbie list question
• Previous by thread: Re: Best Way to Copy from Mathematica to Powerpoint?
• Next by thread: Re; newbie list question