Re: Re: For help about NSolve

• To: mathgroup at smc.vnet.net
• Subject: [mg88343] Re: Re: For help about NSolve
• From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
• Date: Fri, 2 May 2008 03:43:59 -0400 (EDT)
• References: <fvbr3m\$pj2\$1@smc.vnet.net> <4819E6B5.4080304@gmail.com>

```2008/5/2 wtpdrj <45417003 at 163.com>:
>
>
>  This is the result.
>
>
>  why ?

[Cross-posted to comp.soft-sys.math.mathematica aka MathGroup]

ode = y''[x] + y[x]*(1 + y'[x])^(3/2)
nsol = NDSolve[{ode == 0, y[0] == 0, y[1] == 0}, y, {x, 0, 1}]
Plot[y[x] /. nsol[[1]], {x, 0, 1}]
Table[y[x] /. nsol[[1]], {x, 0, 1, 0.1}]

Works fine on my system.

\$Version

"6.0 for Mac OS X x86 (64-bit) (February 7, 2008)"

See

I suspect that you are using a version prior 6.0 and that NDSolve has
been improved meanwhile.

> Thanks again.
>
> å?¨2008-05-01ï¼?"Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com> å??é??ï¼?
>
>
>
> xxhai wrote:
>
> > Differential Equation:
> > y[x]''+y[x]*{(1+y[x]'^2)}^(3/2)=0
> >
> > aboundery condition: y[0]=0, y[1]=0
> >
> > For Numerical Solution ?
> >
> > why Mathematica can't solve the Equation with the initial condition ?
> >
> > please give the correct program for differential equation.
> >
> >
> > thank you a lot.
>
> (* Here is an example of how to use NDSolve and its result *)
> nsol = NDSolve[{y''[x] + y[x]*((1 + y'[x]^2))^(3/2) == 2, y[0] == 0,
>  y[1] == 0}, y, {x, 0, 1}]
> Plot[y[x] /. nsol[[1]], {x, 0, 1}]
> Table[y[x] /. nsol[[1]], {x, 0, 1, 0.1}]
>
> (* As given, your original equation has y(x) = 0 as solution *)
> nsol = NDSolve[{y''[x] + y[x]*((1 + y'[x]^2))^(3/2) == 0, y[0] == 0,
>  y[1] == 0}, y, {x, 0, 1}]
> Plot[y[x] /. nsol[[1]], {x, 0, 1}]
> Table[y[x] /. nsol[[1]], {x, 0, 1, 0.1}]
>
> Regards,
> -- Jean-Marc
>
>
-- Jean-Marc

```

• Prev by Date: Locator
• Next by Date: Re: crosshatch shading
• Previous by thread: Re: For help about NSolve
• Next by thread: Exact Cover