0

I want to get inverse function of this:
-0.5*( (%e^(-4*x))*(%e^(2*x)+1

I tried:

ex1: -0.5*( (%e^(-4*x))*(%e^(2*x)+1) );
ex2: ratsimp(ex1);
ex2;
solve([y=ex2],[x]);

But Maxima return empty array. Really Maxima can't solve this (Wolfram alpha can) or I do something wrong?

Maxima input and output

1 Answers1

2

You could try to solve it with Python's sympy. As sympy is not very fond of floating point numbers, I changed * 0.5 to / 2.

from sympy import symbols, exp, solve, Eq

x, y = symbols('x y')
expr1 = -((exp(-4*x))*(exp(2*x)+1))/2

res = solve(Eq(y, expr1), x)

Result:

[log(-sqrt(-sqrt(1 - 8*y)/y - 1/y)/2),
 log(sqrt(-sqrt(1 - 8*y)/y - 1/y)/2),
 log(-sqrt(sqrt(1 - 8*y)/y - 1/y)/2),
 log(sqrt(sqrt(1 - 8*y)/y - 1/y)/2)]

To check, each of the results can be substituted back into expr1:

for r in res:
    print(expr1.subs(x, r))
    print(expr1.subs(x, r).simplify())

This outputs 4 times y as the simplified expression:

-8*(1 - sqrt(1 - 8*y)/(4*y) - 1/(4*y))/(-sqrt(1 - 8*y)/y - 1/y)**2
y
-8*(1 - sqrt(1 - 8*y)/(4*y) - 1/(4*y))/(-sqrt(1 - 8*y)/y - 1/y)**2
y
-8*(1 + sqrt(1 - 8*y)/(4*y) - 1/(4*y))/(sqrt(1 - 8*y)/y - 1/y)**2
y
-8*(1 + sqrt(1 - 8*y)/(4*y) - 1/(4*y))/(sqrt(1 - 8*y)/y - 1/y)**2
y
JohanC
  • 71,591
  • 8
  • 33
  • 66