       Re: serious NDSolve bug?

• To: mathgroup at smc.vnet.net
• Subject: [mg44026] Re: serious NDSolve bug?
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Sat, 18 Oct 2003 03:12:17 -0400 (EDT)
• Organization: Universitaet Leipzig
• References: <bmod0f\$hof\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

and whe you write

f[kampas_?NumericQ]:=(u[\[Xi]] /. First[sprendinys1 =
NDSolve[{Derivative[\[Psi]][\[Xi]] == (\[Xi]^2 - energija)*
\[Psi][\[Xi]], Derivative[u][\[Xi]] == \[Psi][\[Xi]]^2,
\[Psi][\[Xi]min] == 0,
Derivative[\[Psi]][\[Xi]min] == kampas, u[\[Xi]min] == 0},
{\[Psi][\[Xi]], u[\[Xi]]},
{\[Xi], \[Xi]min, \[Xi]max}]] /. \[Xi] -> \[Xi]max)

and call

FindRoot[f[kampas]==1, {kampas, -0.04, 0.04}]

BTW: Can you avoid postings with Mathematica's special characters ?

Regards
Jens

Artþras Acus wrote:
>
> Hi, All
>
> In version 4.1 the following code works as expected.
>
> \[Xi]min = -5; energija = 2*n + 1 /. n -> 1; \[Xi]max = 5;
>
>   FindRoot[
>    (u[\[Xi]] /. First[sprendinys1 =
> NDSolve[{Derivative[\[Psi]][\[Xi]] == (\[Xi]^2 - energija)*
>             \[Psi][\[Xi]], Derivative[u][\[Xi]] == \[Psi][\[Xi]]^2,
> \[Psi][\[Xi]min] == 0,
>           Derivative[\[Psi]][\[Xi]min] == kampas, u[\[Xi]min] == 0},
> {\[Psi][\[Xi]], u[\[Xi]]},
>          {\[Xi], \[Xi]min, \[Xi]max}]] /. \[Xi] -> \[Xi]max) == 1,
> {kampas, -0.04, 0.04}]
>
> In 5.0 I get message, that kampas is not a number. Changing FindRoot[ ]
> by RootSearch[] (from Ted Ersek package) did not help, therefore I
> suspect that there is serious bug in NDSolve argument evaluation
> procedure. How I can make it to work ?
>
> Sincerely, Arturas Acus

```

• Prev by Date: Re: LinearSolve - consumption time for square and rectangular matrices
• Next by Date: RE: Bug in ReplaceAll and ReplaceRepeated?
• Previous by thread: serious NDSolve bug?
• Next by thread: Re: serious NDSolve bug?