General Exponention

R

rvExcelNewTip

Is there a "general" exponentiation function in excel? I recently ha
to evaluate the function f(x) = (2-x)^(2/3) and I got an error (#NUM!
as soon as x > 2 no matter which excel function I used. However th
function g(x)=(2-x)^(1/3) could be computed without a problem.

Using =(2-a3)^(b3) , =EXP(b3*LN(2-a3)) or =POWER(2-a3,b3) where the b
cell contains the fractional exponent (2/3) made no difference (*)

In this case I could solve the problem by transforming the formula int

=((2-a3)^(c3))^2 , c3: =b3/2 which yielded me the expected answer.

However, I'm still somewhat disappointed, because I had to know tha
the cell b3 would contain exactly 2/3 at the time of execution and thi
will not always be the case.

Hence my question.

(*) =EXP(b3*LN(2-a3)) already flipped (correctly) when a3 =
 
J

Jerry W. Lewis

In general, to take non-integer powers of negative numbers, you must use
complex arithmetic
=IMEXP(IMPRODUCT(2/3,IMLN(2-x)))
Note that this will return a complex number instead of your desired real
branch.

Your workaround takes advantage of a trap-door in Excel that I had not
previously known about, where the special case
(-y)^(1/n)
is evaluated as
-(y^(1/n))

Note that had B2 contained =1/3, then =(2-A3)^B3 would have worked and
=((2-A3)^(C3))^2 would have failed.

If your non-integer power is rational (power=m/n), then you can get a
real solution to -y^power as =(-y^(1/n))^m

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top