# How to convert parsed equation to its source format?

**URL:** <https://discourse.julialang.org/t/how-to-convert-parsed-equation-to-its-source-format/26665>\
**Category:** General Usage\
**Created:** [July 23, 2019, 4:09am UTC](https://discourse.julialang.org/t/how-to-convert-parsed-equation-to-its-source-format/26665 "2019-07-23T04:09:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Islam0mar](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Islam0mar](https://discourse.julialang.org/u/Islam0mar)\
**Post date:** [July 23, 2019, 4:09am UTC](https://discourse.julialang.org/t/how-to-convert-parsed-equation-to-its-source-format/26665/1 "2019-07-23T04:09:23Z")

</div>

I want to change the following equation:  
`11 x² - 484 x + 12358` to ` (11 * x ^ 2 - 484x) + 12358`

- Is there any package or builtin function to do that?

Note:  
My use case is for JuMP package and I have a work around for it.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 23, 2019, 5:56am UTC](https://discourse.julialang.org/t/how-to-convert-parsed-equation-to-its-source-format/26665/2 "2019-07-23T05:56:10Z")

</div>

It is not an equation, but a polynomial. I am assuming you meant ... = 0.

How is it represented in Julia? (note that `x²` is parsed as another variable)

How would you like to change it?

---

<div class="post-metadata">

**Author:** ![Islam0mar](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Islam0mar](https://discourse.julialang.org/u/Islam0mar)\
**Post date:** [July 23, 2019, 6:34am UTC](https://discourse.julialang.org/t/how-to-convert-parsed-equation-to-its-source-format/26665/3 "2019-07-23T06:34:20Z")

</div>

I am using `JuMP` package and `NLobjective` accepts this `:(#= none:1 =# @NLobjective m Min (11 * x ^ 2 - 484x) + 12358)` format, so I want to change this `:(#= none:1 =# @NLobjective m Min 11 x² - 484 x + 12358)` to the accepted format.
