Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: ODE in mathematica. what is wrong?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91320] Re: [mg91307] ODE in mathematica. what is wrong?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Fri, 15 Aug 2008 06:54:12 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200808141101.HAA00111@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

First, insert the missing spaces between other names and y (and avoid 
the Subscript expressions):

   NDSolve[{y'[x]==-\[Rho] y[x],y[0]==y0,I \[HBar] y'[x]==\[Epsilon] 
y[x],y[0]==y0,y''[x]+2 \[Rho] y'[x]+k^2==0,y'[0]==g0},y,x]

Second,it doesn't make sense to ask for a NUMERICAL solution, with 
NDSolve, unless you specify an interval: the last argument should not be 
x but rather something like {x,0,2}.

Third, I'm suspicious of your system of differential equations, because 
if I ask for an exact, symbolic expression by using DSolve instead of 
NDSolve...

   DSolve[{y'[x]==-\[Rho] y[x],y[0]==y0,I \[HBar] y'[x]==\[Epsilon]
      y[x],y[0]==y0,y''[x]+2 \[Rho] y'[x]+k^2==0,y'[0]==g0},y[x],x]

... then I get an error DSolve::overdet "There are fewer dependent 
variables than equations, so the system is overdetermined."


hoi-su jung wrote:
> Hi,
> I am a freshman of Mathematica, I need help here...
> 
> I met such problem as:
> 
> NDSolve[{ y'[x] == -\[Rho]y[x], y[0] == Subscript[y, 0], 
>   I\[HBar] y'[x] == \[Epsilon]y[x], y[0] == Subscript[y, 0], 
>   y''[x] + 2 \[Rho]y'[x] + k^2 == 0, y'[0] == Subscript[g, 0]}, y, x]
> NDSolve::dvnoarg: The function y appears with no arguments.
> 
> How to Handle???
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Another Out of Memory Problem
  • Next by Date: Re: ODE in mathematica. what is wrong?
  • Previous by thread: Re: ODE in mathematica. what is wrong?
  • Next by thread: Re: ODE in mathematica. what is wrong?