Re: DSolve validation
- To: mathgroup at smc.vnet.net
- Subject: [mg34007] Re: [mg33989] DSolve validation
- From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
- Date: Fri, 26 Apr 2002 03:27:32 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Forgot one thing. A simpler way to do the verifying is:
In[1]:=
ode1 = Derivative[2][y][x] + x*y[x] == 0;
In[2]:=
sol1 = DSolve[ode1, y, x]
Out[2]=
{{y -> Function[{x}, AiryAi[(-1)^(1/3)*x]*C[1] +
AiryBi[(-1)^(1/3)*x]*C[2]]}}
In[3]:=
FullSimplify[ode1 /. sol1]
Out[3]=
{True}
On Thursday, April 25, 2002, at 10:06 PM, Andrzej Kozlowski wrote:
> First of all, you forgot something.
>
>
> In[1]:=
> ode1 = Derivative[2][y][x] + x*y[x] == 0;
>
> In[2]:=
> sol1 = DSolve[ode1, y[x], x]
>
> Out[2]=
> {{y[x] -> AiryAi[(-1)^(1/3)*x]*C[1] + AiryBi[(-1)^(1/3)*x]*
> C[2]}}
>
> In[3]:=
> FullSimplify[ode1 /. D[sol1, x, x] /. D[sol1, x] /. sol1]
>
> Out[3]=
> {{{True}}}}
>
> But actually this method will only work in relatively simple cases.
> When the answer is complicated enough there is no algorithm to verify
> it symbolically because there is no algorithm which reduces one
> complicated expression to another. So you have to resort to trying to
> obtain numerical confirmation of the validity of your solutions.
>
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
>
> On Thursday, April 25, 2002, at 04:00 PM, Vladimir Bondarenko wrote:
>
>> Gentlemen,
>>
>> It's easy to double check the DSolve output here:
>>
>> In[1] := ode1 = y''[x] + x y'[x] == 0;
>>
>> In[2] := sol1 = DSolve[ode1, y[x], x]
>> Out[2] = {{y[x] -> C[2] + Sqrt[Pi/2]*C[1]*Erf[x/Sqrt[2]]}}
>>
>> In[3] := ode1 /. D[sol1, x, x] /. D[sol1, x]
>> Out[3] = {{True}}
>>
>> Life is great! Inspirited with the success, let's consider this ODE.
>>
>> In[4] := ode1 = y''[x] + x y[x] == 0;
>>
>> In[5] := sol1 = DSolve[ode1, y[x], x]
>> Out[5] = {{y[x] -> AiryAi[(-1)^(1/3)*x]*C[1] + AiryBi
>> [(-1)^(1/3)*x]*C[2]}}
>>
>> In[6] := ode1 /. D[sol1, x, x] /. D[sol1, x]
>> Out[6] = {{-(x*AiryAi[(-1)^(1/3)*x]*C[1]) - x*AiryBi
>> [(-1)^(1/3)*x]*C[2] + x*y[x] == 0}}
>>
>>
>> (* Oops! The trick does not work ;-( *)
>>
>> In[7] := ode1 /. D[sol1, x, x] /. D[sol1, x]//FullSimplify
>> Out[7] = {{x*(AiryAi[(-1)^(1/3)*x]*C[1] + AiryBi
>> [(-1)^(1/3)*x]*C[2] - y[x]) == 0}}
>>
>>
>> (* Not great, again *)
>>
>> In[8] := ode1 /. D[sol1, x, x] /. D[sol1, x] // ComplexExpand //
>> FullSimplify
>> Out[8] = {{x*(AiryAi[(-1)^(1/3)*x]*C[1] + AiryBi
>> [(-1)^(1/3)*x]*C[2] - y[x]) == 0}}
>>
>> (* etc etc etc *)
>>
>>
>> 'Fraid, the same double check trouble holds for the hundreds ODEs I
>> have tried 8-(
>>
>> What might be a more or less streamlined way to validate the DSolve
>> solutions?
>> Any module (publicly) available? Any (including halp-baked & raw)
>> ideas & hints?
>>
>> Thank you a lot for your time and efforts in advance.
>>
>>
>> Sincerely,
>>
>> Vladimir Bondarenko
>>
>>
>>
>>
>>
>