# simplifying an expectation with the normal law

Just for the fun (since I can find the good result), why am I obliged to help so much Sagemath toç gpo through the last steps of this integration for so elementary evidence ?

```
var("a x s m")
f(x) = - exp(- a*x)
p(x) = (1/ (sqrt(2*pi)*s))*exp(- (1/2)*((x-m)/s)^2)
g(x) = f(x)*p(x)
show((integrate(g(x),(x,-oo,oo)).full_simplify()))
show(integrate(g(x),(x,-oo,oo)).full_simplify().subs({sqrt(s^2):s}).subs({sqrt(s^2):s}))
```

Typo: "toç gpo" -> "to go".