I'm testing dsolve
method of sympy
package in order to check if any differential can be solved and return solution if it is. Trying to solve equation of this kind
from sympy import dsolve
t = symbols('t')
x = Function('x')
dsolve(x(t).diff(t) - x(t)**2 + t**2)
returns an answer:
The last term of this expression tells me that an equation doesn't have explicit solution. How can I check if equation has an explicit solution using sympy
?
I hope something like this:
is_solution_explicit(x(t).diff(t) - x(t)**2 + t**2)
returns False
is_solution_explicit(2*x(t)/(1+t) + (1+t)**3)
returns True