MathGroup Archive 1999

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

Search the Archive

Re: question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15631] Re: question
  • From: "Atul Sharma" <mdsa at musica.mcgill.ca>
  • Date: Sat, 30 Jan 1999 04:28:31 -0500 (EST)
  • Organization: McGill University Computing Centre
  • References: <78pa6k$cn1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Engineers:


solution=DSolve[y''[t]+w^2 y[t]==0,y[t],t]

Notice that DSolve returns a replacement rule, and the two undetermined
constants are called C[1] and C[2]. Thus the variable "solution" is a
replacement rule. To get y[t] itself, we need to ask for
y[t]/.solution. The result has been called "y".

y=y[t]/.solution

Notice that we still have a pair of braces around "y". We can remove
them by picking off just the first part of "y".

y=y[[1]]

--------------------------------------------------------------------------
Experience is a hard teacher because she gives the test first, the
lesson afterward.


Atul Sharma MD, FRCP(C)
Pediatric Nephrologist,
McGill University/Montreal Children's Hospital 2300 Tupper, Montreal,
QC, Canada H3H 1P3

email: mdsa at musica.mcgill.ca




Alice M. Dean wrote in message <78pa6k$cn1 at smc.vnet.net>...
>Hi, I was given this address by a colleague, who said you could quickly
>answer what I think is a very simple question.  After I evaluate the
>following in mathematica,
>
>DSolve[{P'[t]==0.031P[t], P[0]==5.3}, P[t],t]
>
>I get a result which is essentially: {{P[t] -> 5.3 E ^(0.031t)}}
>
>inside two sets of curly brackets.
>
>I would now like to compute P[10], P[100], etc.  Is there a reasonable
>way to do this?  Thanks, Alice Dean
>
>~~~~~~~~~~~~~~~~~~~~~~~~~
>Alice Dean
>Mathematics & Computer Science Department Skidmore College
>Saratoga Springs, NY 12866
>
>Phone: (518) 580-5286
>Fax: (518) 580-5936
>Skidmore College Information: (518) 580-5000   E-mail:
>adean at skidmore.edu
>WWW: http://www.skidmore.edu/~adean
>~~~~~~~~~~~~~~~~~~~~~~~~~
>



  • Prev by Date: Re: animated, variable color lines in ListPlot
  • Next by Date: Re: How to fix bad EPS output from Display[.., .., "EPS"]
  • Previous by thread: Re: question
  • Next by thread: Re: question