# Converting an expression to a specific form with Symbolics.jl

**URL:** <https://discourse.julialang.org/t/converting-an-expression-to-a-specific-form-with-symbolics-jl/137160>\
**Category:** General Usage\
**Tags:** symbolics\
**Created:** [May 18, 2026, 11:09am UTC](https://discourse.julialang.org/t/converting-an-expression-to-a-specific-form-with-symbolics-jl/137160 "2026-05-18T11:09:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![owiecc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/owiecc/32/8894_2.png) [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Post date:** [May 18, 2026, 11:09am UTC](https://discourse.julialang.org/t/converting-an-expression-to-a-specific-form-with-symbolics-jl/137160/1 "2026-05-18T11:09:43Z")

</div>

I would like to convert an expression to a specific mathematical form. Is this possible to do with Symbolics.jl (or any other package for that matter)? Specifically I would like to convert an arbitrary transfer function G(s) to a polynomial form: G(s) = Y(s)/X(s) where Y(s) and X(s) are polynomials. I would essentially get the coefficients for these polynomials.

---

<div class="post-metadata">

**Author:** ![charlesknipp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charlesknipp/32/214437_2.png) [@charlesknipp](https://discourse.julialang.org/u/charlesknipp)\
**Post date:** [May 19, 2026, 8:14pm UTC](https://discourse.julialang.org/t/converting-an-expression-to-a-specific-form-with-symbolics-jl/137160/2 "2026-05-19T20:14:31Z")

</div>

You can use ControlSystems.jl to define a transfer function (see the docs [here](https://juliacontrol.github.io/ControlSystems.jl/dev/man/creating_systems/)) and DSP.jl to get its various representations. Since there is an appropriate extension between these packages (see [here](https://github.com/JuliaControl/ControlSystems.jl/blob/master/lib/ControlSystemsBase/ext/ControlSystemsBaseDSPExt.jl)), conversion is quite simple.
