# Simplifying equations in python using wolframclient

I’ve this mathematical expression and want it to `Simplify` it in python using wolframclient wrapper.

``````1/700*((-1316*w + b - 0.0)^2 + (-1116*w + b - 1.0)^2)
``````

I’ve tried this method:

``````In(1): mathematica_session.evaluate(wlexpr('1/700*((-1316*w+b-0.0)^2+(-1116*w+b-1.0)^2)'))
Out(1): Times(Rational(1, 700), Plus(Power(Plus(0.0, Global`b, Times(-1316, Global`w)), 2), Power(Plus(-1.0, Global`b, Times(-1116, Global`w)), 2)))
``````

And then this method:

``````In(2): mathematica_session.evaluate(wl.Simplify('1/700*((-1316*w+b-0.0)^2+(-1116*w+b-1.0)^2)'))
Out(2): '1/700*((-1316*w+b-0.0)^2+(-1116*w+b-1.0)^2)'
``````

And finally this is the result when I tried this on directly Mathematica:

``````In(1): Simplify(1/700*((-1316*w + b - 0.0)^2 + (-1116*w + b - 1.0)^2))
Out(1): 0.00285714 (0.5 + b^2 + b (-1. - 2432. w) + 1116. w + 1.48866*10^6 w^2)
``````

And this is the result I want in python. So what I’m missing or doing wrong in python?