# The constant of the Normal law

This is a sequel of the question Using Mathematica to derive the PDF of the normal distribution.

sol = DSolve[ϕ'[x] == -k (x - μ)/σ^2 ϕ[x], ϕ[x], x]


Gives the Normal law distribution up to a parameter. ---C[1]---. Unfortunately this C[1] is the solution of

Solve [(Integrate[sol[[1, 1, 2]] /. C[1] -> a , {x, -∞, ∞}]) == 1, a]


but after one hour Mathematica fails to find a solution. It fails also to find the solution with boundary conditions

• The problem is that Integrate returns a ConditionalExpression; try evaluating the integral first to see what I mean. To get around this, do Integrate[sol[[1, 1, 2]] /. C[1] -> a , {x, -∞, ∞}, Assumptions->{k > 0, μ > 0, σ > 0}] and try again. – march Sep 22 '16 at 16:23
• @march $\mu$ doesn't have to be positive. – corey979 Sep 22 '16 at 16:27
• @corey979. Right, the condition on $\mu$ is unnecessary. I was just trying to get the point across. – march Sep 22 '16 at 16:28
• Of course, if I have seen somebody asking such a question without Assumptions, I would have tell him. Buut I am so absentminded. Sorry. This is a point but not the all story. I have simplified in setting $k=0$ . But the integral is an infinite object and you cannot apply Solve to this tyope of object – cyrille.piatecki Sep 22 '16 at 18:06
• of course it was a typesetting mistake $k=0$ was $k=1$. – cyrille.piatecki Sep 22 '16 at 19:41

You do not want to set k = 0

sol = ϕ[x] /.
DSolve[ϕ'[x] == -k (x - μ)/σ^2 ϕ[x], ϕ[x], x][[1]]

(*  E^((k*(-(x^2/2) + x*μ))/σ^2)*C[1]  *)

Assuming[{k > 0, σ > 0},
sol /. Solve[
Integrate[sol, {x, -Infinity, Infinity}] == 1, C[1]][[1]] //
Simplify]

(*  Sqrt[k]/(E^((k*(x - μ)^2)/
(2*σ^2))*(Sqrt[2*Pi]*σ))  *)


A simple form would be k = 1