MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NDSolve problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42434] Re: [mg42425] NDSolve problem
  • From: Selwyn Hollis <selwynh at earthlink.net>
  • Date: Mon, 7 Jul 2003 03:05:59 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Owen,

NDSolve isn't any good at solving nonlinear boundary-value problems, 
and your condition V[0] == V[3]-100 make matters even worse. Here's an 
approach that *might* work:

Define

f[v0_, vp0_] :=V /. First[NDSolve[
{1 - 5*x - 0.2*V[x] - V'[x] + V'[x]^2 + V''[x] == 0, V[0] == v0, V'[0] 
== vp0}, V, {x, 0, 100}]]

Now you want to solve the system v0 == f[v0,vp0][3] - 100, 
f[v0,vp0][100] == -200, for v0 and vp0. In principle, that can be done 
with FindRoot:

FindRoot[{v0 == f[v0, vp0][3] - 100, f[v0, vp0][100] == -200}, {v0, 0, 
1}, {vp0, 0, 1}]

The catch is that you need to provide good initial guesses. (The zeros 
and ones I have here don't work.) If you have some rough idea of what 
V[0] and V'[0] should be, you might get this to work.

But then again, I'm not convinced that the problem even *has* a 
solution.

-----
Selwyn Hollis
http://www.math.armstrong.edu/faculty/hollis




On Sunday, July 6, 2003, at 06:57  AM, Owen Wu wrote:

> Hello,
>
> I try to numerically solve a nonlinear ODE:
>
> NDSolve[
> {1-5x-0.2V[x]-V'[x]+V'[x]^2+V''[x]==0, V[0]==V[3]-100,V[100]==-200},
> V,{x,0,100}]
>
> Mathematica returns:
> NDSolve::inrhs: Differential equation does not evaluate to a number or
> the equation is not an nth order linear ordinary differential
> equation.
>
> How can I get around this difficulty?
>
> Thanks,
> Owen
>
>


  • Prev by Date: how make it faster?
  • Next by Date: Re: Speed improvements in Mathematica 5 ??
  • Previous by thread: NDSolve problem
  • Next by thread: Why is it so???