# Another mathematica problem

1. Apr 24, 2005

### bruce999

Hello again.

I have a solution for a simple differenttial eqn. "Simpletreb=First@NDSolve[{phi''[t] == -d
Sin[phi[t]], phi[0] == (3π/4), phi'[0] == 0}, phi[t], {t, 0, 1}]"

After some plots and other calculations i need to find the value for phi at t=0.224511 so i input "phi[0.224511]/.simpletreb" but this just outputs "phi[0.224511]". I've also tried "Evaluate[phi[0.224511]/.simpletreb" with no joy.

My .nb file is here: (you have to cut and paste the link i'm afraid) "http://bruce1711.150m.com/simple trebuchet (first) final.nb"

Any ideas anyone???

Last edited: Apr 24, 2005
2. Apr 24, 2005

### saltydog

In general:

solution=NDSolve[{y''[x]=such and such},y,{x,0,end}];

f[x_]:=Evaulate[y[x]/.solution];

Now, can use f[x] like any other function.

3. Apr 24, 2005

### bruce999

Ok i tried that and i still get:
"Evaulate[phi[0.22]]" as the answer instead of a value.

4. Apr 24, 2005

### bruce999

Got it now thanks Saltydog.