An MGF exercise I would appreciate some help in the following exercise:
Let the Random Variable $Y$ have the moment generating function $$M(t)=\exp\{q(\theta)-q(\theta+t) \}$$ where $q(.)$ is a function. If $E[Y]=\theta$, prove that that $Y\sim N(\theta,1)$.
Hint: Consider $M\prime (0) =\theta$ and solve the differential equation.

Starting from $M\prime (0)$ then, we see that $$M\prime (0)=-q \prime (\theta)=\theta $$
A solution of this differential equation is $ q (\theta)=C\exp\{-\theta \}$, with $C$ being a constant which I am having trouble definitizing. 
I fear that I have reached a dead end. I think I need to show that the MGF takes the form $\exp\{\theta t +(1/2) t^2 \}$, i.e. the MGF of a normal distribution with mean $\theta$ and variance $1$. In order to do that, however, I have to definitize the constant which due to the lack of boundary conditions, I don't seem to be able to.
Any advice on how to proceed from here? Thank you.
 A: By definition, the moment generating function (mgf) of a random variable $X$ is 
$$\phi(t) = \mathbb{E}(e^{tX}).$$
If this exists and is analytic at $t=0$, it can be expanded into a MacLaurin series (Taylor series at $0$)
$$\phi(t) = 1 + \mathbb{E}(X)t + \frac{t^2}{2}\mathbb{E}(X^2) + \frac{t^3}{3!}\mathbb{E}(X^3) + \cdots + \frac{t^n}{n!}\mathbb{E}(X^n) + \cdots.$$
Simple operations on $\phi$ yield moments of $X$.  For instance,
$$\phi^\prime(t) = \frac{d}{dt}\phi(t) = \mathbb{E}(X) + \frac{t}{2}\mathbb{E}(X^2)  + \cdots.$$
Evaluating this at $t=0$ yields
$$\phi^\prime(t)|_{t=0} = \mathbb{E}(X) = \theta$$
according to the assumptions of the question.  Let us apply this to the given expression for $\phi$, adding the assumption that $q$ is differentiable in a neighborhood of $\theta$:
$$\frac{d}{dt}\phi(t) = \frac{d}{dt} e^{q(\theta) - q(\theta+t)} = -q^\prime(\theta+t)e^{q(\theta) - q(\theta+t)} .$$
At $t=0$ the argument of the exponential reduces to $q(\theta) - q(\theta)=0$, whence the exponential reduces to unity, leaving
$$\theta = \phi^\prime(0) = -q^\prime(\theta).$$
This is trivial to integrate, with general solution
$$q(\theta) = C - \frac{1}{2}\theta^2.$$
Plugging back in to the mgf simplifies it to
$$\phi(t) =  e^{q(\theta) - q(\theta+t)} = \exp\left(\left(C - \frac{1}{2}\theta^2\right) - \left(C - \frac{1}{2}\left(\theta+t\right)^2\right)\right) = \exp\left(\theta t + \frac{1}{2}t^2\right).$$
A deeper theorem asserts that the unique distribution with this mgf is the Normal distribution with mean $\theta$ and unit variance, QED.
