RE: DSolve solution validation
- To: mathgroup at smc.vnet.net
- Subject: [mg33949] RE: [mg33910] DSolve solution validation
- From: "DrBob" <majort at cox-internet.com>
- Date: Wed, 24 Apr 2002 01:22:02 -0400 (EDT)
- Reply-to: <drbob at bigfoot.com>
- Sender: owner-wri-mathgroup at wolfram.com
Consider this: Clear[f,g] f[z_]:=Exp[z] g[z_]:=-f[-z] f'[z]-Abs[f[z]]//InputForm E^z - E^Re[z] g'[z]-Abs[g[z]] //InputForm E^(-z) - E^(-Re[z]) So you see, here are two solutions (f and g) to your differential equation, if z is restricted to Real values. Unfortunately, DSolve doesn't make that assumption, or can't simplify the solutions properly. Bobby Treat -----Original Message----- From: Vladimir Bondarenko [mailto:vvb at mail.strace.net] To: mathgroup at smc.vnet.net Subject: [mg33949] [mg33910] DSolve solution validation Sometimes, it is easy to double check the DSolve's output. However, an attempt to solve DSolve[y'[z] == Abs[y[z]], y[z], z] yields {{y[z] -> InverseFunction[(-(Log[2*Sqrt[Im[K$3541]^2 + Re[K$3541]^2] + (2*(-Im[K$3541]^2 + Im[K$3541]*Im[#1] - Re[K$3541]^2 + Re[K$3541]*Re[#1]))/ Sqrt[Im[K$3541]^2 - 2*Im[K$3541]*Im[#1] + Im[#1]^2 + Re[K$3541]^2 - 2*Re[K$3541]*Re[#1] + Re[#1]^2]]/Sqrt[Im[K$3541]^2 - 2*Im[K$3541]*Im[#1] + Im[#1]^2 + Re[K$3541]^2 - 2*Re[K$3541]*Re[#1] + Re[#1]^2]) + Log[2*Sqrt[Im[#1]^2 + Re[#1]^2] + (2*((-Im[K$3541])*Im[#1] + Im[#1]^2 - Re[K$3541]*Re[#1] + Re[#1]^2))/ Sqrt[Im[K$3541]^2 - 2*Im[K$3541]*Im[#1] + Im[#1]^2 + Re[K$3541]^2 - 2*Re[K$3541]*Re[#1] + Re[#1]^2]]/Sqrt[Im[K$3541]^2 - 2*Im[K$3541]*Im[#1] +Im[#1]^2 + Re[K$3541]^2 - 2*Re[K$3541]*Re[#1] + Re[#1]^2])*(-K$3541 + #1) & ][z + C[1]]}} If I try to use D[] to check it, I get an expression with ByteCount of 737608. The attempt to Simplify this huge expression for the derivative gave no answer after 1 hour at CPU = Athlon FX 1600+ / RAM = 512 Mb. Question # 1: Is the above shown solution correct? (It involves 2 free constants, K$3541 and C[1], but after simplification K$3541 might disappear? (Also, this ODE is not linear, so the answer to it might have 2 free constants?) By hand I found z Sign[y[z]] - Log[y[z]] = C[1] Question # 2: Is this implicit solution correct? (I am not 100% sure) Question # 3: Looks like I've calculated a collection of ODEs about which I suspect that the corresponding DSolve's solutions are invalid. What are the possible ways to double check these solutions? Any modules written in Mathematica? Anything else? Vladimir Bondarenko