Python Forum

Full Version: Symplify symbolic expression
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
Using lcapy module produced following expression for transfer function:
H
⎛ s⋅(C_d + C_id) ⎞
⎜────────────────────────⎟
⎝C_d + C_f + C_icm + C_id⎠
────────────────────────────────────────────
1
s + ────────────────────────────────────────
C_d⋅R_f + C_f⋅R_f + C_icm⋅R_f + C_id⋅R_f

Viewing this expression it's clear that it can be simplified (e.g. multiply nominator and denominator by (C_d + C_f + C_icm + C_id))
Does exist a some function allowing to simplify symbolic expressions ?
Thanks
Resolved.
Hs = H.simplify()
gets this:
Hs
R_f⋅s⋅(C_d + C_id)
────────────────────────────────────
R_f⋅s⋅(C_d + C_f + C_icm + C_id) + 1