# Feynman-Kac formula for $\mu(t,x)=-\frac{1}{1-t}, \sigma(t,x)=1$ and $g(t,x)=x^2$

Consider the following PDE on $$[0,T]\times \mathbb{R}$$: $$\begin{cases} \dfrac{\partial F}{\partial t}+\mu(t,x) \dfrac{\partial F}{\partial x}+ \frac12 \sigma^2(t,x)\dfrac{\partial^2 F}{\partial x^2} = 0 \\ F(T,x)=g(x) \end{cases}$$ with $$\mu(t,x)=-\frac{1}{1-t}, \ \sigma(t,x)=1, \ g(x)=x^2$$.

Question: What is the solution of the problem?

I know that if $$X=\{X_t: t \geq 0\}$$ satisfies $$dX_t=\mu(t,X_t)dt+\sigma(t,X_t)dW_t$$ then (by Feynman-Kac's theorem) $$F(t,x)=\mathbb{E}^Q[g(X_T)|X_t=x]$$

I know that $$X_T=X_t-\int_{t}^T\frac{1}{1-s}ds+\int_{t}^TdW_s$$ but then I don't know how to deal with $$(X_T)^2$$. How can I get the solution?

• Try to expand $X_T^2$ and see what you can have. May 19 '20 at 16:55
• That's what I've tried but I get stuck... I know that $$\int_{t}^TdW_s=W_T-W_t$$ but I don't know for example how to get rid of $$\int_{t}^T \frac{1}{1-s}ds$$ May 19 '20 at 18:00