# Math Help - How do I plug in a value into a function with Maxima?

1. ## How do I plug in a value into a function with Maxima?

Let's say I did diff(x^2, x); which will give me 2x, and imagine that 2x is %o1 (output 1), how can I plug in a value for x into the function without having to retype the function. This is a basic example but if the function is huge, it would be very convenient to know this.

Any input would be greatly appreciated!

2. Originally Posted by s3a
Let's say I did diff(x^2, x); which will give me 2x, and imagine that 2x is %o1 (output 1), how can I plug in a value for x into the function without having to retype the function. This is a basic example but if the function is huge, it would be very convenient to know this.

Any input would be greatly appreciated!
(%i4) f(x):=''(diff(x^2,x));
(%o5)                                  4