Assume that $X_t$ is a process with dynamics $dX_t = \sigma X_t dW_t$ is where $W_t$ is a standard Brownian motion. Given two deterministic functions $p(t)$ and $q(t)$, compute $\mathbb{E}[p(t)X(t)+q(t)]$.
Solution
Since $p$ and $q$ are deterministic we have $$\mathbb{E}[p(t)X(t)+q(t)] = p(t) \mathbb{E}[X(t)]+q(t)=p(t)X_0+q(t)$$ where the last equation from the fact that $X_t$ is a martingale. To be more precise, $\mathbb{E}[X(t)|X_0]=X_0$.
SDE dynamics
I want to derive the SDE for $p(t)X(t)+q(t)$ using Ito's lemma. First, I am considering the case $V(t)=p(t)X(t)$, then according to Ito's lemma: \begin{align} dV_t&=\frac{\partial p}{\partial t}X_tdt+p(t)\sigma X_tdW_t \\ &=\frac{1}{p(t)}\frac{\partial p}{\partial t}V_tdt+\sigma V_tdW_t \end{align} The SDE that remains is quite straightforward to solve then with solution: $$V(t) = V(0)\exp \left \{ \left(\frac{1}{p(t)}\frac{\partial p}{\partial t} - \frac{\sigma^2}{2}\right)T + \sigma W_t\right \} $$ This will give a different answer for $\mathbb{E}[p(t)X(t)]$, so I am wondering where my mistake is.