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