4

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)

Matt
  • 389

1 Answers1

1

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, ...

Moo
  • 11,311
  • It doesn't work for e.g. addition. For example evaluate f(5) + f(3) for f(x) = x^2 does not work, though evaluate f(5) - f(3) for f(x) = x^2 works. – Matt Jan 14 '18 at 13:40
  • 1
    It does seem buggy, but see the update. Looks like this may force you into trying variants. – Moo Jan 14 '18 at 14:06