# on Cole-Hopf transformation to solve Viscous Burgers' PDE. What to do with the constant that comes up?

I am learning Cole-Hopf to solve Burgers' pde on a bounded domain with homogeneous boundary conditions and initial conditions.

But the few references I saw so far seem to gloss over what happens to the constant of integration that pops up during the transformation process.

I wrote down the steps below. At one point, when integrating both sides a constant must show up. My question is how to get rid of it.

Solve

$$u_{t}+u\ u_{x}=Du_{xx}\tag{1}$$

BC \begin{align*} u\left( 0,t\right) & =0\qquad t>0\\ u\left( L,t\right) & =0\qquad t>0 \end{align*} Initial conditions $$u\left( x,0\right) =f\left( x\right) \qquad0<x<L$$

Where $D$ is the diffusion constant.

Solution

Using Cole-Hopf, let $$u\left( x,t\right) =-2D\frac{\phi_{x}}{\phi}\tag{2}$$ where $\phi\equiv\phi\left( x,t\right)$. Rewriting equation (1) as

\begin{align} u_{t} & =Du_{xx}-u\ u_{x}\nonumber\\ & =\left( Du_{x}-\frac{u^{2}}{2}\right) _{x}\tag{3} \end{align}

Substituting (2) into (3) gives

\begin{align} \left( -2D\frac{\phi_{x}}{\phi}\right) _{t} & =\left[ D\left( -2D\frac{\phi_{x}}{\phi}\right) _{x}-\frac{1}{2}\left( -2D\frac{\phi_{x} }{\phi}\right) ^{2}\right] _{x}\nonumber\\ -2D\left( \frac{\phi_{x}}{\phi}\right) _{t} & =\left( -2D^{2}\left( \frac{\phi_{x}}{\phi}\right) _{x}-2D^{2}\left( \frac{\phi_{x}}{\phi}\right) ^{2}\right) _{x}\nonumber\\ -2D\left( \frac{\phi_{x}}{\phi}\right) _{t} & =-2D^{2}\left( \left( \frac{\phi_{x}}{\phi}\right) _{x}+\left( \frac{\phi_{x}}{\phi}\right) ^{2}\right) _{x}\tag{4} \end{align}

But $$\left( \frac{\phi_{x}}{\phi}\right) _{t}=-\frac{1}{\phi^{2}}\phi_{t}\phi _{x}+\frac{1}{\phi}\phi_{xt}$$

And

$$\left( \frac{\phi_{t}}{\phi}\right) _{x}=-\frac{1}{\phi^{2}}\phi_{x}\phi _{t}+\frac{1}{\phi}\phi_{tx}$$

Therefore $\left( \frac{\phi_{x}}{\phi}\right) _{t}=\left( \frac{\phi_{t} }{\phi}\right) _{x}$. Using this in LHS of (4) gives

$$-2D\left( \frac{\phi_{t}}{\phi}\right) _{x}=-2D^{2}\left( \left( \frac{\phi_{x}}{\phi}\right) _{x}+\left( \frac{\phi_{x}}{\phi}\right) ^{2}\right) _{x}\tag{5}$$

And \begin{align*} \left( \frac{\phi_{x}}{\phi}\right) _{x}+\left( \frac{\phi_{x}}{\phi }\right) ^{2} & =-\frac{1}{\phi^{2}}\phi_{x}^{2}+\frac{\phi_{xx}}{\phi }+\frac{\phi_{x}^{2}}{\phi^{2}}\\ & =\frac{\phi_{xx}}{\phi} \end{align*}

Using the above in the RHS of (5) gives

$$-2D\left( \frac{\phi_{t}}{\phi}\right) _{x}=-2D^{2}\left( \frac{\phi_{xx} }{\phi}\right) _{x}\tag{6}$$

Integrating both side w.r.t. $x$ gives

$$-2D\frac{\phi_{t}}{\phi}=-2D^{2}\frac{\phi_{xx}}{\phi}+G\left( t\right)$$

Where $G\left( t\right)$ is the constant of integration since $\phi \equiv\phi\left( x,t\right)$.

question is How to get rid of $G\left( t\right)$. On https://en.wikipedia.org/wiki/Burgers%27_equation it says the following, near the middle of the page

Wikipedia is using $f(t)$ above while I used $G(t)$ for the constant of integrations. I do not know how Wikipedia got $f(t)\phi$ in there as the constant of integration. Will now continue the derivation:

The above simplifies to the heat PDE in $\phi\left( x,t\right)$

$$\phi_{t}=D\phi_{xx}+G\left( t\right) \tag{6A}$$

The original BC and initial conditions are now transformed to $\phi$ to solve the above. Since $u=-2D\frac{\phi_{x}}{\phi}$, then solving this first for $\phi$

\begin{align*} \frac{\phi_{x}}{\phi} & =-\frac{1}{2D}u\\ \frac{\partial\phi}{\partial x}\frac{1}{\phi} & =-\frac{1}{2D}u\\ \frac{d\phi}{\phi} & =-\frac{1}{2D}udx \end{align*}

Integrating gives

\begin{align*} \ln\phi & =-\frac{1}{2D}\int_{0}^{x}u\ ds + C_{0} \\ \phi\left( x,t\right) & =Ce^{-\frac{1}{2D}\int_{0}^{x}u\ ds} \end{align*}

Since $u=-2D\frac{\phi_{x}}{\phi}$, then the constant $C$ cancels out. Then we it can be set to any value as it does not affect the solution. Let $C=1$ and the above becomes

$$\phi\left( x,t\right) =e^{-\frac{1}{2D}\int_{0}^{x}u\ ds}\tag{7}$$

(7) is now used to transform the initial conditions. When $u\left( x,0\right) =f\left( x\right)$ the above becomes

\begin{align*} \phi\left( x,0\right) & =e^{-\frac{1}{2D}\int_{0}^{x}u\left( s,0\right) \ ds}\\ & =e^{-\frac{1}{2D}\int_{0}^{x}f\left( s\right) \ ds} \end{align*}

To transform the boundary conditions, $u=-2D\frac{\phi_{x}}{\phi}$ is used. When $u\left( 0,t\right) =0$ then $0=-2D\frac{\phi_{x}\left( 0,t\right) }{\phi\left( 0,t\right) }$ or

$$\phi_{x}\left( 0,t\right) =0$$

Similarly, when $u\left( L,t\right) =0$ then $0=-2D\frac{\phi_{x}\left( L,t\right) }{\phi\left( L,t\right) }$ or

$$\phi_{x}\left( L,t\right) =0$$

Hence the heat PDE to solve is

$$\phi_{t}=D\phi_{xx}+G\left( t\right)$$

BC \begin{align*} \phi_{x}\left( 0,t\right) & =0\qquad t>0\\ \phi_{x}\left( L,t\right) & =0\qquad t>0 \end{align*} Initial conditions $$\phi\left( x,0\right) =e^{-\frac{1}{2D}\int_{0}^{x}f\left( s\right) \ ds}\qquad0<x<L$$

I saw a reference, which https://en.wikipedia.org/wiki/Burgers%27_equation that this constant of integration $G(t)$ vanishes for periodic boundary conditions. But I did not understand why and how. And the references I saw later, seem to skip over this specific part.

Here are the 3 references I used so far

https://www.ijser.org/researchpaper/Numerical-Solution-of-Burgers-equation-via-Cole-Hopf-transformed-diffusion-equation.pdf

https://en.wikipedia.org/wiki/Burgers%27_equation

My question is basically how to handle the $G(t)$ constant of integration in the above process. Did I make any mistake in the above?

• (Not an answer to the question, but the guy's name is Burgers, not Burger.) – Hans Lundmark May 25 '18 at 11:39
• @HansLundmark thanks. I changed it to Burgers' instead of Burger's. I see now that how it is commonly written. some papers actually still write it as Burger's. – Nasser May 25 '18 at 18:39
• You can get ridd of $f(t)$ in $\phi_t = \nu\phi_{xx} + f(t)\phi$ by defining $\psi = \phi e^{-\int f(t){\rm d}t}$ so that $\psi_t = [\phi_t -f(t)\phi]e^{-\int f(t){\rm d}t} = \nu\phi_{xx}e^{-\int f(t){\rm d}t} = \nu \psi_{xx}$ which is a normal heat equation. – Winther May 25 '18 at 19:03
• btw it should be $G(t)\phi$ not just $G(t)$ right? – Winther May 25 '18 at 19:06
• Equation 6 reads $\frac{\partial}{\partial x}\left[\frac{\phi_t - D\phi_{xx}}{\phi}\right] = 0$. Integration gives a constant on the right hand side and you then multiply each side by $\phi$. – Winther May 25 '18 at 19:14

Thanks to the hint by @Winther in the comment to my question above, I needed an additional transformtion to get rid of that constant of integration. (Papers and links I saw, seem to skip over such details, making them hard to learn from. being student, I like to see every step used in derivation)

So I re-wrote the derivation. I think now it works OK.

Solve $$u_{t}+u\ u_{x}=Du_{xx}\tag{1}$$

BC \begin{align*} u\left( 0,t\right) & =0\qquad t>0\\ u\left( L,t\right) & =0\qquad t>0 \end{align*} Initial conditions $$u\left( x,0\right) =f\left( x\right) \qquad0<x<L$$

Where $D$ is the diffusion constant.

Solution

Using Cole-Hopf, let $$u\left( x,t\right) =-2D\frac{\phi_{x}}{\phi} \tag{2}$$ where $\phi\equiv\phi\left( x,t\right)$. Rewriting equation (1) as

\begin{align} u_{t} & =Du_{xx}-u\ u_{x}\nonumber\\ & =\left( Du_{x}-\frac{u^{2}}{2}\right) _{x} \tag{3} \end{align}

Substituting (2) into (3) gives

\begin{align} \left( -2D\frac{\phi_{x}}{\phi}\right) _{t} & =\left[ D\left( -2D\frac{\phi_{x}}{\phi}\right) _{x}-\frac{1}{2}\left( -2D\frac{\phi_{x} }{\phi}\right) ^{2}\right] _{x}\nonumber\\ -2D\left( \frac{\phi_{x}}{\phi}\right) _{t} & =\left( -2D^{2}\left( \frac{\phi_{x}}{\phi}\right) _{x}-2D^{2}\left( \frac{\phi_{x}}{\phi}\right) ^{2}\right) _{x}\nonumber\\ -2D\left( \frac{\phi_{x}}{\phi}\right) _{t} & =-2D^{2}\left( \left( \frac{\phi_{x}}{\phi}\right) _{x}+\left( \frac{\phi_{x}}{\phi}\right) ^{2}\right) _{x} \tag{4} \end{align}

But $$\left( \frac{\phi_{x}}{\phi}\right) _{t}=-\frac{1}{\phi^{2}}\phi_{t}\phi _{x}+\frac{1}{\phi}\phi_{xt}$$

And

$$\left( \frac{\phi_{t}}{\phi}\right) _{x}=-\frac{1}{\phi^{2}}\phi_{x}\phi _{t}+\frac{1}{\phi}\phi_{tx}$$

Therefore $\left( \frac{\phi_{x}}{\phi}\right) _{t}=\left( \frac{\phi_{t} }{\phi}\right) _{x}$. Using this in LHS of (4) gives

$$-2D\left( \frac{\phi_{t}}{\phi}\right) _{x}=-2D^{2}\left( \left( \frac{\phi_{x}}{\phi}\right) _{x}+\left( \frac{\phi_{x}}{\phi}\right) ^{2}\right) _{x} \tag{5}$$

And \begin{align*} \left( \frac{\phi_{x}}{\phi}\right) _{x}+\left( \frac{\phi_{x}}{\phi }\right) ^{2} & =-\frac{1}{\phi^{2}}\phi_{x}^{2}+\frac{\phi_{xx}}{\phi }+\frac{\phi_{x}^{2}}{\phi^{2}}\\ & =\frac{\phi_{xx}}{\phi} \end{align*}

Using the above in the RHS of (5) gives

$$-2D\left( \frac{\phi_{t}}{\phi}\right) _{x}=-2D^{2}\left( \frac{\phi_{xx} }{\phi}\right) _{x} \tag{6}$$

Integrating both side w.r.t. $x$ gives

$$-2D\frac{\phi_{t}}{\phi}=-2D^{2}\frac{\phi_{xx}}{\phi}+G\left( t\right)$$

Where $G\left( t\right)$ is the constant of integration since $\phi \equiv\phi\left( x,t\right)$. The above simplifies to the heat PDE in $\phi\left( x,t\right)$

$$\phi_{t}=D\phi_{xx}+G\left( t\right) \phi\tag{6A}$$

Let (this is the missing step that makes the constant go away. Thanks to Winther for pointing it out)

$$\psi=\phi e^{-\int G\left( t\right) dt}\tag{6B}$$

Then \begin{align*} \psi_{t} & =\phi_{t}e^{-\int G\left( t\right) dt}-\phi G\left( t\right) e^{-\int G\left( t\right) dt}\\ & =\left( \phi_{t}-\phi G\left( t\right) \right) e^{-\int G\left( t\right) dt} \end{align*}

But from (6A), we see that $\phi_{t}-\phi G\left( t\right) =D\phi_{xx}$. Therefore the above becomes

$$\psi_{t}=D\phi_{xx}e^{-\int G\left( t\right) dt}$$

But from (6B), we see that $\phi_{xx}e^{-\int G\left( t\right) dt}=\psi _{xx}$, therefore the above becomes

$$\psi_{t}=D\psi_{xx}$$

Which is the heat PDE. The original BC and initial conditions are now transformed to $\psi$ to solve the above. Since $u=-2D\frac{\phi_{x}}{\phi}$, then solving this first for $\phi$

\begin{align*} \frac{\phi_{x}}{\phi} & =-\frac{1}{2D}u\\ \frac{\partial\phi}{\partial x}\frac{1}{\phi} & =-\frac{1}{2D}u\\ \frac{d\phi}{\phi} & =-\frac{1}{2D}udx \end{align*}

Integrating gives

\begin{align*} \ln\phi & =-\frac{1}{2D}\int_{0}^{x}u\ ds+C_{0}\\ \phi\left( x,t\right) & =Ce^{-\frac{1}{2D}\int_{0}^{x}u\ ds} \end{align*}

Since $u=-2D\frac{\phi_{x}}{\phi}$, then the constant $C$ cancels out. Then we it can be set to any value as it does not affect the solution. Let $C=1$ and the above becomes

$$\phi\left( x,t\right) =e^{-\frac{1}{2D}\int_{0}^{x}u\ ds} \tag{7}$$

(7) is now used to transform the initial conditions. When $u\left( x,0\right) =f\left( x\right)$ the above becomes

\begin{align*} \phi\left( x,0\right) & =e^{-\frac{1}{2D}\int_{0}^{x}u\left( s,0\right) \ ds}\\ & =e^{-\frac{1}{2D}\int_{0}^{x}f\left( s\right) \ ds} \end{align*}

Since from (6B), $\psi\left( x,t\right) =\phi e^{-\int G\left( t\right) dt}=\phi e^{-\int_{0}^{t}G\left( s\right) ds}$ therefore

\begin{align*} \psi\left( x,0\right) & =\phi\left( x,0\right) e^{0}\\ & =\phi\left( x,0\right) \\ & =e^{-\frac{1}{2D}\int_{0}^{x}f\left( s\right) \ ds} \end{align*}

To transform the boundary conditions, $u=-2D\frac{\phi_{x}}{\phi}$ is used. When $u\left( 0,t\right) =0$ then $0=-2D\frac{\phi_{x}\left( 0,t\right) }{\phi\left( 0,t\right) }$ or

$$\phi_{x}\left( 0,t\right) =0$$

But $\psi=\phi e^{-\int_{0}^{t}G\left( s\right) ds}$, then $\psi_{x} =\phi_{x}e^{-\int_{0}^{t}G\left( s\right) ds}$ and therefore

\begin{align*} \psi_{x}\left( 0,t\right) & =\phi_{x}\left( 0,t\right) e^{-\int_{0} ^{t}G\left( s\right) ds}\\ & =0 \end{align*}

Similarly, when $u\left( L,t\right) =0$ then $0=-2D\frac{\phi_{x}\left( L,t\right) }{\phi\left( L,t\right) }$ or

$$\phi_{x}\left( L,t\right) =0$$

Which gives

$$\psi_{x}\left( L,t\right) =0$$

Hence the heat PDE to solve is

$$\psi_{t}=D\psi_{xx}$$

BC \begin{align*} \psi_{x}\left( 0,t\right) & =0\qquad t>0\\ \psi_{x}\left( L,t\right) & =0\qquad t>0 \end{align*} Initial conditions $$\psi\left( x,0\right) =e^{-\frac{1}{2D}\int_{0}^{x}f\left( s\right) \ ds}\qquad0<x<L$$

The above heat PDE is now solved for $\psi\left( x,t\right)$. This solution is transformed back to $u\left( x,t\right)$. First using $\psi=\phi e^{-\int_{0}^{t}G\left( s\right) ds}$ to find $\phi\left( x,t\right)$, then using $u\left( x,t\right) =-2D\frac{\phi_{x}}{\phi}$, to find $u\left( x,t\right)$.

So in summary

There are two transformations needed. Going from $u\left( x,t\right) \rightarrow\phi\left( x,t\right)$ uses Cole-Hopf. Going from $\phi\left( x,t\right) \rightarrow\psi\left( x,t\right)$ uses $\psi\left( x,t\right) =\phi\left( x,t\right) e^{-\int G\left( t\right) dt}.$

It is $\psi\left( x,t\right)$ which is solved as the heat PDE $\psi_{t}=D\psi_{xx}$ and not $\phi\left( x,t\right)$, which is just an intermediate transformation.