# Viscosity Solution for Hamilton Jacobi equation

I am trying to do a numerical approximation of the viscosity solution for the Hamilton-Jacobi problem

$$\hspace{5cm}\displaystyle \frac{du}{dt}+\frac{|u_x|^2}{2}=0 \hspace{0.5cm} x \in \mathbb{R},\hspace{0.3cm}t \in [0,+\infty[$$

$$\hspace{5cm}\displaystyle u(x,0)=\sin(x)\hspace{0.5cm}x \in \mathbb{R}$$

So I need to calculate the explicit solution to compare them. I read about Lax-Hopf formula applied to the general problem and the solution should be

$$u(x,t)=\inf_{y \in \mathbb{R}} \left \{ \sin(y)+\frac{|x-y|^2}{2t}\right \}$$

Can someone give me some help/ hint to find a explicit form for this infimus? Greetings

• The minimum is attained when $$\cos(y) + (y-x)/t=0.$$ Such equations generally can not be solved explicitly. You might try the method of characteristics. – Jeff Oct 11 '17 at 15:00
• I should add, you can always compute the inf using a root finding algorithm, like Newton's method, up to machine accuracy to compare your numerical solution against. – Jeff Oct 11 '17 at 15:02
• Thx, ill try to compute this. – Mat128 Oct 12 '17 at 9:14