[Date Index]
[Thread Index]
[Author Index]
Re: Problem with DSolve
*To*: mathgroup at smc.vnet.net
*Subject*: [mg53526] Re: [mg53513] Problem with DSolve
*From*: DrBob <drbob at bigfoot.com>
*Date*: Sat, 15 Jan 2005 21:07:58 -0500 (EST)
*References*: <200501150644.BAA25342@smc.vnet.net>
*Reply-to*: drbob at bigfoot.com
*Sender*: owner-wri-mathgroup at wolfram.com
First verify that the solution is correct (assuming you're getting the same solution as I get in version 5.1):
op=D[#,x]^2-x D[#,x]+#&;
soln=y[x]/.DSolve[op@y[x]\[Equal]0,y[x],x];
op/@soln;
Simplify[%]
{0,0,0,0}
Next verify that your "generic" solution really is a solution:
generic = c*(x - c);
op[generic]
Simplify[%]
c^2 - c*x + c*(-c + x)
0
And now we find c in each case (if possible) to retrieve Solve's solutions from yours:
soln /. (a_)^(1/2) /; !FreeQ[a, x] :>
Factor[a]^(1/2);
% /. {(E^(a_)*(b_)^2)^(1/2) :> E^(a/2)*b,
((-E^(a_))*(b_)^2)^(1/2) :> E^(I*(a/2))*b};
% /. E^(a_) -> E^(2*a);
Thread[% == generic];
(Solve[#1, c] & ) /@ %;
Drop[%, 2] /. C[1] -> C[1]/2
{{{c -> (1/2)*(-4 - Sqrt[2]* E^(C[1]/2))},
{c -> (1/2)*(4 + Sqrt[2]* E^(C[1]/2) + 2*x)}},
{{c -> (-2*Sqrt[2] + E^(C[1]/2))/Sqrt[2]},
{c -> (1/2)*(4 - Sqrt[2]* E^(C[1]/2) + 2*x)}}}
Ignore solutions for c that aren't free of x, of course.
That retrieves the last two Solve solutions; the first two can be retrieved as well, I think, but I'll wait for someone to do it more elegantly than I have!
Bobby
On Sat, 15 Jan 2005 01:44:13 -0500 (EST), Anand <anand at phy.duke.edu> wrote:
> Consider this simple 1st order equation
>
> DSolve[(y'[x])^2 - x y'[x] + y[x] == 0, y[x], x]
>
> The generic solution should be y= c ( x - c)
> and in addition a singular solution of this equation is y = x2/4 .
>
> The solution Mathematica produces is different. At least I could not
> relate it to the above solutions. What am I missing?
> sincerely, -anand.
>
>
>
>
>
--
DrBob at bigfoot.com
www.eclecticdreams.net
Prev by Date:
**Re: Mathematica 5.1 JLink problem (solved)**
Next by Date:
**Re: cubic quarternion group**
Previous by thread:
**Re: Problem with DSolve**
Next by thread:
**Re: Problem with DSolve**
| |