import sympy as sp
sp.init_printing()
%matplotlib notebook
import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display
Can somebody help me please?
import sympy as sp
sp.init_printing()
%matplotlib notebook
import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display
Can somebody help me please?
I suspect that you want to solve a differential equation involving only scalar variables.
>>> import sympy as sp
>>> sp.var('x')
x
>>> f = sp.Function('f')
>>> sp.dsolve(sp.Derivative(f(x),x)-(1/(1+x**2)-2*f(x)**2))
Eq(f(x), x**3*(2*C1*(C1 - 1) - 1)/3 + x**5*(C1*(16*C1*(-9*C1 + 1) - 13*C1 + 2) - 20*C1 + 12)/30 + C1 + C1*x + C1*x**4*(13*C1 + 2)/6 - C1**2*x**2 + O(x**6))
If you have an initial condition and need to solve for the arbitary constant then Represent a first order differential equation in numpy might help. (I don't know for sure.)