       Re: Diff. Equ

• To: mathgroup at smc.vnet.net
• Subject: [mg43748] Re: Diff. Equ
• From: "Peter Pein" <nospam at spam.no>
• Date: Fri, 3 Oct 2003 02:28:38 -0400 (EDT)
• References: <blcq7i\$p63\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Add the condition ;/NumericQ[thetastrich] at the end of the definition of
SolutionFind. You'll probably have to do the same at the definitions of R
and Teta:

SolutionFind[druck_, v_, tetastrich_] := With[...]/;NumericQ[tetastrich]

This should work fine.

--
Peter Pein, Berlin
peer.pien at freenet.de
please correct my name to write to me!

"Prechtl Josef" <e9426270 at stud4.tuwien.ac.at> schrieb im Newsbeitrag
news:blcq7i\$p63\$1 at smc.vnet.net...
> Hello,
> I'm trying to solve a set of ordinary diff. equations (the independant
> parameter is s), for which certain boundary conditions have to be
> fulfilled: one boundary condition at s=0, the second one at an unknown s1.
> I am trying to solve this equation with a 'shooting' method, trying to
> vary one parameter (in my case it is tetastrich) in the system of diff.
> equation, and have a look if the boundary equations are fulfilled at the
> second boundary. This is implemented in Solution[] via FindRoot.
> SolutionFind[..,tetastrich] should solve the diff. equation for a given
> tetastrich (basically it uses NDSolve[]). Obviously, in order to do that,
> this routine needs to be evaluated already with a certain numerical value
> of tetastrich; however, in my case this seems not to be the case, since I
> always get the error message:
> NDSolve::"ndinn": "Initial condition \!\(1.`\\ tetastrich\) is not a
> number."
>
> WHY??????????
> Thanx for any useful comment in advance!!
> j.h.
>
>
> Solution[druck_, v_] :=
>   FindRoot[Evaluate[SolutionFind[druck, v, tetastrich]], {tetastrich, 0}]
>
> SolutionFind[druck_, v_, tetastrich_] :=
>   With[{min =
>         FindMinimum[
>             Evaluate[-Teta[s, druck, v, tetastrich]], {s, 0, 0,
>               2\[Pi]}][]}, {R[s, druck, v, tetastrich] == 0 /. min,
>       Teta[s, druck, v, tetastrich] == \[Pi] /. min}]
>

```

• Prev by Date: Re: Non-string output in for loop
• Next by Date: Re: A question on interval arithmetic
• Previous by thread: Re: Terras inverse
• Next by thread: Non-negative Least Squares (NNLS) algorithm