M BUZZ CRAZE NEWS
// updates

How can I input a function $f$ and then evaluate an expression like $f(a) - f(b)$ in WolframAlpha?

By Emma Johnson
$\begingroup$

Is there a WolframAlpha command that would allow me to input a function and then evaluate an expression containing it? For instance I have a lengthy function like $f(x) = \frac{x^3 + \sin(x)}{\arcsin(x) + \frac{2}{x}} $ and I don't want to evaluate $f(5) - f(3)$ by writing $f$ twice substituting for $x$ first $5$ and then $3$ but write it only once and then use its name e.g $f$ as a reference like this:

f(x) = (x^3 + sin(x))/(arcsin(x) + 2/x), f(5) - f(3)

$\endgroup$

1 Answer

$\begingroup$

Try

 evaluate f(5) - f(3) for f(x) = (x^3 + sin(x))/(arcsin(x) + 2/x)

Update

It seems like the above is buggy for general functions, so you might have to try variants like (the example shown below works, but the one above does not - so it looks like you are stuck trying variants).

 f(x) = x^2, evaluate f(5) + f(3) 

An alternate approach is to use another online calculator like SAGEMath, Magma, SymPy, ...

$\endgroup$ 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy