Partial derivative #27337
Partial derivative
#27337
Replies: 2 comments
-
I think it is not available. The In [15]: from sympy.core.function import AppliedUndef
In [16]: x = Function('x')
In [17]: E = cos(x(t)) + exp(x(t) * t)
In [18]: E2 = E.replace(lambda e: isinstance(e, AppliedUndef), lambda e: Dummy('rep_'+str(e)))
In [19]: E2
Out[19]:
repₓ₍ₜ₎⋅t
ℯ + cos(repₓ₍ₜ₎)
In [20]: E2.has(t)
True |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks a lot for this solution! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sa,y I have a sympy expression E, which contains functions of t, and maybe also t explicitly, e.g. E = sm.cos(x(t)) + sm.exp(x(t) * t)$\dfrac{\partial E}{\partial t} == 0$
To see, whether t is in the expression explicitly, I would check whether
I could not find anything in the sympy documentation. Did I miss it, or is it not available?
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions