from sympy import *
import numpy as np
x= symbols('x')
gfg_exp = np.tan(x)-1/x
intr = solve(gfg_exp, x)
print("After Integration : {}".format(intr))
I've tried to solve equation with this code but it did not work.
----> 5 gfg_exp = np.tan(x)-1/x
TypeError: loop of ufunc does not support argument 0 of type Symbol which
has no callable tan method
I'm sure this is due to tan(x)
.
If this is a bad way, is there a good code to work on the equations in the specific interval by Python?
It would be nice to use numerical algorithms, but it would take too much time to get one by one, and it would be inconvenient to set the initial value separately.