Re: coding problem

• To: mathgroup at smc.vnet.net
• Subject: [mg60188] Re: coding problem
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Tue, 6 Sep 2005 05:28:51 -0400 (EDT)
• Organization: The University of Western Australia
• References: <dfj9bg\$rfm\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <dfj9bg\$rfm\$1 at smc.vnet.net>,
"Ming Hong" <zhongming at gmail.com> wrote:

> I am trying to solve the following equations:
>
> xy''+(1+x)y'=0
> xy'(0)=-1/2

This condition does not make sense. What you mean is that as x -> 0,

x y'[x] -> -1/2

> y(Infinity)=0
>
> Here is what I put into Mathematica:
>
> Dsolve[{x*y''[x]+(1+x)*y'[x]==0,x*y'[0]==-1/2,y[Infinity]==0},y,x]
>
> It didn't work and I can not figure out why.

Here is one way to solve your equations. First drop the problematic
condition and obtain the general solution:

sol = First[DSolve[{x y''[x]+(1+x) y'[x]==0, y[Infinity]==0},y,x]]

Now determine the remaining constant:

cond = x y'[x] == -(1/2) /. sol /. x -> 0

and obtain the desired solution:

y[x] /. sol /. First[Solve[cond, C[1]]]

The result is

-1/2 ExpIntegralEi[-x]

Cheers,
Paul

_______________________________________________________________________
Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)
AUSTRALIA                               http://physics.uwa.edu.au/~paul

```

• Prev by Date: Re: Latex & Mathematica
• Next by Date: Re: Hold[] ReleaseHold[] ? or what ?
• Previous by thread: Re: coding problem
• Next by thread: Re: coding problem