How can I type this into a calculator?

42 Views Asked by At

In a textbook I am asked to calculate an expression using a calculator: $$\frac{1}{2}\ln\left(e^{22}\right)$$

I tried using:

0.5*log(exp**22)

This returned an error:

File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/decorators.py", line 91, in __sympifyit_wrapper return func(a, b) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/decorators.py", line 132, in binary_op_wrapper return func(self, other) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/expr.py", line 172, in __rpow__ return Pow(other, self) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/cache.py", line 95, in wrapper retval = func(*args, **kwargs) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/power.py", line 286, in __new__ obj = b._eval_power(e) TypeError: unbound method _eval_power() must be called with exp instance as first argument (got Integer instance instead)

I tried replacing $\exp$ with just $e$ and received a similar error.

From my solutions page I can see that the answer is $11$. How can I type the expression in order to get $11$ back?

2

There are 2 best solutions below

2
On BEST ANSWER

You should use exp as function: 0.5*log(exp(22))

1
On

You don't even need a calculator.

Note that $\ln(e) = 1$ as $e^1 = e$. Recall also that $\log_b (x^n) = n \log_b (x).$ Thus $\frac{1}{2} \ln(e^{22}) = 11.$