Alternative path that works better with complicated derivatives. Also shows 
the nicer output inside Jupyter notebooks.
[image: Screen Shot 2022-04-19 at 9.23.21 AM.png]

On Tuesday, April 19, 2022 at 8:16:25 AM UTC-5 [email protected] wrote:

> 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/7480d68d-f183-4a1b-831e-ba3b85040161n%40googlegroups.com.

Reply via email to