In [1]: eqn = Derivative(Derivative(f(x),x)*x,x)/x - exp(x)
In [2]: eqn
Out[2]:
d ⎛ d ⎞
──⎜x⋅──(f(x))⎟
x dx⎝ dx ⎠
- ℯ + ──────────────
x
In [3]: dsolve(eqn, f(x))
---------------------------------------------------------------------------
NotImplementedError
In [16]: res = expand((simplify(eqn * x).integrate(x) + C1)/x).integrate(x) + C2
...:
In [17]: res
Out[17]:
x
C₁⋅log(x) + C₂ + f(x) - ℯ + Ei(x)
In [18]: solve(res, f(x))
Out[18]:
⎡ x ⎤
⎣-C₁⋅log(x) - C₂ + ℯ - Ei(x)⎦
In [23]: eqn = log(log(f(x))*x)/x - exp(x)
In [24]: eqn
Out[24]:
x log(x⋅log(f(x)))
- ℯ + ────────────────
x
In [25]: solve(eqn, f(x))
Out[25]:
⎡ x⎤
⎢ x⋅ℯ ⎥
⎢ ℯ ⎥
⎢ ─────⎥
⎢ x ⎥
⎣ℯ ⎦
In [26]: eqn = ((f(x)).diff(x)*x).diff(x)/x - exp(x)
In [27]: eqn
Out[27]:
2
d d
x⋅───(f(x)) + ──(f(x))
2 dx
x dx
- ℯ + ──────────────────────
x
In [28]: dsolve(eqn)
---------------------------------------------------------------------------
NotImplementedError
In [32]: eqn = (g(x)*x).diff(x)/x - exp(x)
In [33]: eqn
Out[33]:
d
x⋅──(g(x)) + g(x)
x dx
- ℯ + ─────────────────
x
In [34]: dsolve(eqn, g(x))
Out[34]:
x
C₁ x ℯ
g(x) = ── + ℯ - ──
x x
In [41]: dsolve(eqn, g(x)).integrate(x)
Out[41]:
⌠
⎮ ⎛ x⎞
⌠ ⎮ ⎜C₁ x ℯ ⎟
⎮ g(x) dx = ⎮ ⎜── + ℯ - ──⎟ dx
⌡ ⎮ ⎝x x ⎠
⌡
In [40]: dsolve(eqn, g(x)).rhs.integrate(x)
Out[40]:
x
C₁⋅log(x) + ℯ - Ei(x)
In [43]: eqn = exp(f(x).diff(x)-f(x))
In [44]: eqn
Out[44]:
d
-f(x) + ──(f(x))
dx
ℯ
In [45]: dsolve(eqn, f(x))
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-45-b99728060ab1> in <module>()
----> 1 dsolve(eqn, f(x))
~/current/sympy/venv/lib/python3.6/site-packages/sympy/solvers/ode.py in dsolve(eq, func, hint, simplify, ics, xi, eta, x0, n, **kwargs)
662 # The key 'hint' stores the hint needed to be solved for.
663 hint = hints['hint']
--> 664 return _helper_simplify(eq, hint, hints, simplify, ics=ics)
665
666 def _helper_simplify(eq, hint, match, simplify=True, ics=None, **kwargs):
~/current/sympy/venv/lib/python3.6/site-packages/sympy/solvers/ode.py in _helper_simplify(eq, hint, match, simplify, ics, **kwargs)
687 # attempt to solve for func, and apply any other hint specific
688 # simplifications
--> 689 sols = solvefunc(eq, func, order, match)
690 if isinstance(sols, Expr):
691 rv = odesimp(sols, func, order, cons(sols), hint)
~/current/sympy/venv/lib/python3.6/site-packages/sympy/solvers/ode.py in ode_lie_group(eq, func, order, match)
5460 else:
5461 y = Dummy("y")
-> 5462 h = sol[0].subs(func, y)
5463
5464 if xis is not None and etas is not None:
IndexError: list index out of range
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JpeWJJLZBPOgMnEFuRqsg3xc1-5gn6iiaDN9k07%2Bb4Dw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6LBZBMa%3Dd_ma3Eg3L3hcXGPBDuOXeNqc0dpS6BsA%3DUXaw%40mail.gmail.com.