Error. SymPy considers this Bernoulli equation
y' = P(x) * y + Q(x) * y**n
without checking that the exponent n is constant. Therefore, the decision is incorrect.
I raised issue on the SymPy tracker. It will soon be fixed in the version of SymPy , and then in version 1.2. (Aside, 1.0 is a bit old, many things have improved in 1.1.1, although not the same.)
Upon amendment, SymPy recognizes that there is no explicit solution and resortes to the power series method, creating several members of the power series:
Eq(y(x), x + x**2*log(C1)/2 + x**3*(log(C1)**2 + 2/C1)/6 + x**4*(log(C1)**3 + 9*log(C1)/C1 - 3/C1**2)/24 + x**5*(log(C1)**4 + 2*(log(C1) - 1/C1)*log(C1)/C1 + 2*(2*log(C1) - 1/C1)*log(C1)/C1 + 22*log(C1)**2/C1 - 20*log(C1)/C1**2 + 20/C1**2 + 8/C1**3)/120 + C1 + O(x**6))
You do not need to wait until the patch receives this series of power, it can be obtained by providing SymPy a βhintβ:
dsolve(diff(y(x), x) - y(x)**x, hint='1st_power_series')
Works better with the initial condition:
dsolve(diff(y(x), x) - y(x)**x, ics={y(0): 1}, hint='1st_power_series')
returns
Eq(y(x), 1 + x + x**3/3 - x**4/8 + 7*x**5/30 + O(x**6))
source share