MathGroup Archive 2005

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

Search the Archive

Re: function of a function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62650] Re: function of a function
  • From: "Narasimham" <mathma18 at hotmail.com>
  • Date: Wed, 30 Nov 2005 00:07:02 -0500 (EST)
  • References: <dmha20$932$1@smc.vnet.net><dmhfhd$bit$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jens-Peer Kuska wrote:

> it can't work because f [0] ==1 given in your differential equation
> f ' [0]==f [1] and NDSolve[] can't find the value for
> f[1] 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[0]== 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[0]== 1};
NDSolve[EQ,f,{x,0,4}];
f[x_]=f[x]/.First[%];
Plot[f[x],{x,0,4}];

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

Regards
Narasimham

Jens-Peer Kuska wrote:
> Hi,
>
> it can't work because f[0]==1 give in your
> differential equation
> f'[0]==f[1] and NDSolve[] can't find the value for
> f[1] 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 at hotmail.com> schrieb im
> Newsbeitrag news:dmha20$932$1 at smc.vnet.net...
> | Tried to solve numerically:
> |
> |
> http://groups.google.com/group/sci.math/browse_frm/thread/248f76d024c1ac57/0bba983777a07bc9#0bba983777a07bc9
> |
> | thus:
> |
> | EQ= { f'[x] == f[f[x]], f[0]== 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[0] values.
> Any way to do that?
> |


  • Prev by Date: Re: Hardcopy or electronic books?
  • Next by Date: Re: Re: FW: 3D plot question
  • Previous by thread: function of a function
  • Next by thread: Re: function of a function