Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: How do I get a DSolve'd function

  • To: mathgroup at
  • Subject: [mg54397] Re: How do I get a DSolve'd function
  • From: highegg at (highegg)
  • Date: Sun, 20 Feb 2005 00:07:55 -0500 (EST)
  • References: <bri4oj8p6w4b@legacy>
  • Sender: owner-wri-mathgroup at

On 18 Feb 05 20:11:37 -0500 (EST), Skirmantas wrote:
>I hope this is the last question for now.
>I can solve a differential equation and plot it by doing something
>like this:
>But how do I get the function f[x] itself? I want to be able to input
>f[x] and get its definition. Or do Plot[f[x],{x,0,10}]. Or define
>f[x]/.sol or f[x_]:=f[x]/.sol or f[x_]:=sol[[n,n,n]] do not work.
>What if the solution is a function with many variables, say u[x,y,z]?
>What's the correct way to "get" it?  

that's because DSolve (like all Solve statements) always generates a
list of solutions, even if there's a single one.
You must therefore extract the one you are interested in by doing
f /. First[sol] 
this gives you the function. 
f/. sol gives you a list of functions.


  • Prev by Date: Re: How do I get a DSolve'd function
  • Next by Date: Re: Re: grphing in Mathematica
  • Previous by thread: Re: How do I get a DSolve'd function
  • Next by thread: Re: Leading Zeros?