f

#### Re: Re: function of a function

```On 30 Nov 2005, at 14:07, Narasimham wrote:

> Jens-Peer Kuska wrote:
>
>> it can't work because f  ==1 given in your differential equation
>> f ' ==f  and NDSolve[] can't find the value for
>> f until it has integrated the equation.
>
> ???
>
>> The nested dependence is equivalent to an infinite
>> system of ordinary differential equations and it seems to be
>> hard to do this by a finte computer.
>
> I cannot understand this. In the following two examples the first one
> works, not the second.
>
> Clear[x,f,EQ];
> EQ={f'[x] == f[Cos[x]],f== 1};
> NDSolve[EQ,f,{x,0,4}];
> f[x_]=f[x]/.First[%];
> Plot[f[x],{x,0,4}];
>
> Clear[x,f,EQ];
> EQ={f'[x] == Cos[f[x]],f== 1};
> NDSolve[EQ,f,{x,0,4}];
> f[x_]=f[x]/.First[%];
> Plot[f[x],{x,0,4}];

Surely, you mean the second one works, the first one does not!? Also,
I think I agree with Jens. These cases are quite different and the
problem he mentione does not arise in the second case. Ine the second
case the derivative at a point x is defined only in terms of the
value of the function at x. Thus values of the function, it's
derivative, function etc, can be computed sequentially. In the first
case, however, in order to compute the derivative at x you need to
know the value of the function at Cos[x], which in general will not
be known yet. This is, I think, what Jens meant and it seems to me
clearly right.

>
> It appears (to me) the power of programming with functions in
> Mathematica has not been used to the full.
>
>

What do you mean? Can you suggest an approximation scheme for this
sort of problem?

Andrzej Kozlowski

> Jens-Peer Kuska wrote:
>> Hi,
>>
>> it can't work because f==1 give in your
>> differential equation
>> f'==f and NDSolve[] can't find the value for
>> f until it
>> has integrated the equation.
>> The neted dependence is equvalent to a infinite
>> system of
>> ordinary differential equations and it seems to be
>> hard to do
>> this by a finte computer.
>>
>> Regards
>>   Jens
>>
>> "Narasimham" <mathma18@hotmail.com> schrieb im
>> Newsbeitrag news:dmha20\$932\$1@smc.vnet.net...
>> | Tried to solve numerically:
>> |
>> |
>> 248f76d024c1ac57/0bba983777a07bc9#0bba983777a07bc9
>> |
>> | thus:
>> |
>> | EQ= { f'[x] == f[f[x]], f== 1} ;
>> NDSolve[EQ,f,{x,0,2}];
>> |
>> | But gives an error.  NDSolve::ndnum:
>> Differential equation does not
>> | evaluate to a number at x = 0.
>> |
>> | Also does not work even with other f values.
>> Any way to do that?
>> |
>

``` 0 11/30/2005 10:46:36 AM comp.soft-sys.math.mathematica  28821 articles. 0 followers. 1 Replies 1087 Views Similar Articles

[PageSpeed] 10

```Yes, absolutely.. Thanks to you and Jens.  :)  Actually I was
temporarily swayed by so many postings in the thread and accepted the
implicit suggestion that the problem is well posed !  [ To solve  an
ODE F ( f (x), y, y' ) = 0 is  OK, but not F (  f (x), f (y), y'  ) ! ]

Regards
Narasimham

Andrzej Kozlowski wrote:
> On 30 Nov 2005, at 14:07, Narasimham wrote:
>
> > Jens-Peer Kuska wrote:
> >
> >> it can't work because f  ==1 given in your differential equation
> >> f ' ==f  and NDSolve[] can't find the value for
> >> f until it has integrated the equation.
> >
> > ???
> >
> >> The nested dependence is equivalent to an infinite
> >> system of ordinary differential equations and it seems to be
> >> hard to do this by a finte computer.
> >
> > I cannot understand this. In the following two examples the first one
> > works, not the second.
> >
> > Clear[x,f,EQ];
> > EQ={f'[x] == f[Cos[x]],f== 1};
> > NDSolve[EQ,f,{x,0,4}];
> > f[x_]=f[x]/.First[%];
> > Plot[f[x],{x,0,4}];
> >
> > Clear[x,f,EQ];
> > EQ={f'[x] == Cos[f[x]],f== 1};
> > NDSolve[EQ,f,{x,0,4}];
> > f[x_]=f[x]/.First[%];
> > Plot[f[x],{x,0,4}];
>
>
> Surely, you mean the second one works, the first one does not!? Also,
> I think I agree with Jens. These cases are quite different and the
> problem he mentione does not arise in the second case. Ine the second
> case the derivative at a point x is defined only in terms of the
> value of the function at x. Thus values of the function, it's
> derivative, function etc, can be computed sequentially. In the first
> case, however, in order to compute the derivative at x you need to
> know the value of the function at Cos[x], which in general will not
> be known yet. This is, I think, what Jens meant and it seems to me
> clearly right.
>
> >
> > It appears (to me) the power of programming with functions in
> > Mathematica has not been used to the full.
> >
> >
>
> What do you mean? Can you suggest an approximation scheme for this
> sort of problem?
>
> Andrzej Kozlowski
>
>
>
> > Jens-Peer Kuska wrote:
> >> Hi,
> >>
> >> it can't work because f==1 give in your
> >> differential equation
> >> f'==f and NDSolve[] can't find the value for
> >> f until it
> >> has integrated the equation.
> >> The neted dependence is equvalent to a infinite
> >> system of
> >> ordinary differential equations and it seems to be
> >> hard to do
> >> this by a finte computer.
> >>
> >> Regards
> >>   Jens
> >>
> >> "Narasimham" <mathma18@hotmail.com> schrieb im
> >> Newsbeitrag news:dmha20\$932\$1@smc.vnet.net...
> >> | Tried to solve numerically:
> >> |
> >> |
> >> 248f76d024c1ac57/0bba983777a07bc9#0bba983777a07bc9
> >> |
> >> | thus:
> >> |
> >> | EQ= { f'[x] == f[f[x]], f== 1} ;
> >> NDSolve[EQ,f,{x,0,2}];
> >> |
> >> | But gives an error.  NDSolve::ndnum:
> >> Differential equation does not
> >> | evaluate to a number at x = 0.
> >> |
> >> | Also does not work even with other f values.
> >> Any way to do that?
> >> |
> >

``` 0 12/1/2005 5:13:21 AM