Is this the behavior you are trying to get?
>>> from algebra_with_sympy import *
>>> algwsym_config.output.human_text=True
>>> var('psi k x')
(psi, k, x)
>>> eq1=Eqn(psi, exp(I*k*x))
>>> eq1
psi = exp(I*k*x)
>>> eq2 =diff(eq1,x)
>>> eq2
Derivative(psi, x) = I*k*exp(I*k*x)
>>> eq2.subs({exp(I*k*x):psi})
Derivative(psi, x) = I*k*psi
Jonathan
On Tuesday, April 19, 2022 at 7:50:54 AM UTC-5 [email protected] wrote:
> When I differentiate the function
>
> ψ = exp(I*(k*x))
>
> I get
>
> i*k*exp(I*(k*x)). [which is i*k*ψ]
>
> Is there a way to get exp(I*(k*x)) substituted with ψ, in order to get
> the shorter expression i*k*ψ ?
>
> Thanks,
> André
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/3ad5c732-248a-4e56-9b1b-c195b1c13435n%40googlegroups.com.