I have the function:
f(x) = 1 / (x + a)^t + b
And I would like to solve for a given t
for a
and b
the equation system {f(0)=1 and f(1)=0}
.
For t=1 a solution is successfully calculated:
import sympy as sp
a,b = sp.symbols("a b")
res = sp.solve([1/(a+1)**1 +b, 1/a**1+b-1], [a,b])
res
# [(-1/2 + sqrt(5)/2, -sqrt(5)/2 + 1/2), (-sqrt(5)/2 - 1/2, 1/2 + sqrt(5)/2)]
But for any t other than 1 (and most of the time also 2) no solution is found:
import sympy as sp
a,b = sp.symbols("a b")
res = sp.solve([1/(a+1)**1.5 +b, 1/a**1.5+b-1], [a,b])
res
gives:
NotImplementedError: could not solve
b*(-(1 + sqrt(3)*I)*(1/(b**2 - 2*b + 1))**(1/3)/2 + 1)**(3/2) + 1
Is it possible to approach this problem in SymPy from a more efficient angle?
Suggestions for Python packages useful for tackling this are also most welcome.