So I want to solve the problem:

\begin{align} u_t-u_{xx}&=\cosh(x), \quad 0<x<4, \quad t>0\\u(x,0)&=v(x),\\u(0,t)&=0,\\u(4,t)&=0. \end{align}

The inhomogeneous part is easy. Due to the $t$-inhomogeneity we want to find a function $f(x)$ such that it solves $-f''(x)=\cosh(x)$. Thus a solution is given by


The initial condition $u(0,t)=0\implies f(0)=0$ which gives $b=1$. The other initial condition $u(4,t)=0\implies f(4)=0$ gives $a=\frac{\cosh(4)-1}{4}.$ This means that


From here, this is what the prof says:

Now we need to solve the homogeneous part. Observe that we have to modify our initial condition, cause when we add the steady state solution, if we don’t modify the IC, then the steady state solution part will screw it up. So, we solve the problem:

\begin{align} u_t-u_{xx}&=0, \quad 0<x<4, \quad t>0\\u(x,0)&=v(x)-f(x),\\u(0,t)&=0,\\u(4,t)&=0. \end{align}

Our full solution will be equal to $u(x,t)+f(x).$

Question: I don't understand why we need to do this modification of the IC on this particular boundary value problem. Can someone shed some light on this?


The given solution was confusing since they used the same symbol for the actual solution and the homogeneous solution. So let's write

$$ u(x,t) = f(x) + \bar u(x,t) $$

where $f(x)$ is the function you just found, and $\bar u$ is the "remainder". Plug this form into the PDE to get

$$ u_t - u_{xx} = \bar u_t - \bar u_{xx} - f''(x) = \cosh(x) $$

But we already have $-f''(x) = \cosh x$, therefore it remains the $\bar u$ must be homogeneous

$$ \bar u_t - \bar u_{xx} = 0 $$

Finding the initial condition works the same way

$$ u(x,0) = f(x) + \bar u(x,0) = v(x) \implies \bar u(x,0) = v(x) - f(x) $$

And we have a new BVP in $\bar u$

\begin{cases} \bar u_t - \bar u_{xx} = 0 \\ \bar u(x,0) = v(x) - f(x) \\ \bar u(0,t) = \bar u(4,t) = 0 \end{cases}

Is this clear?

  • $\begingroup$ I don't know who you are or what you are, but your answers on my PDE-problems just give me great satisfaction since you always seem to adress my issue exactly. Not only do I know what to do mechanically, but I also understand exactly why. Thank you sir! $\endgroup$ – Parseval Mar 1 at 10:42

Update: Let $u(x,t)$ be the solution of \begin{align} u_t-u_{xx}&=0, \quad 0<x<4, \quad t>0\\u(x,0)&=v(x)-f(x),\\u(0,t)&=0,\\u(4,t)&=0. \end{align}

First note that $f''(x)=-\cosh(x)$. Let $w(x,t)=u(x,t)+f(x)$. Then $$ w_t-w_{xx}=u_t-u_xx-f''(x)=\cosh(x), \quad 0<x<4, t>0 $$ and $$ w(x,0)=u(x,0)+f(x)=v(x), w(0,t)=u(0,t)+f(0)=0, w(4,t)=u(4,t)+f(4)=0. $$ Namely, $w(x,t)$ is the full solution of the original equation.

Note that $\{\sin(\frac{n\pi x}{4})\}$ is dense in $L=\{u\in L^2([0,4]): u(0)=u(4)=0\}$. Let the solution have the form $$ u(x,t)=\sum_{n=1}^\infty a_n(t)\sin(\frac{n\pi x}{4}). $$ Then setting $u_t-u_{xx}=0$ gives $$ \sum_{n=1}^\infty \bigg[a_n'(t)+\frac{n^2\pi^2}{16}a_n(t)\bigg]\sin(\frac{n\pi x}{4}) =0 $$ and hence $$ a_n'(t)+\frac{n^2\pi^2}{16}a_n(t)=0, n=1,2,\cdots. \tag{1}$$ (1) has the general solution $$ a_n(t)=C_ne^{-\frac{n^2\pi^2}{16}t}.$$ So $$ u(x,t)=\sum_{n=1}^\infty C_ne^{-\frac{n^2\pi^2}{16}t}\sin(\frac{n\pi x}{4}). $$ But $u(x,0)=v(x)-f(x)$ gives $$ \sum_{n=1}^\infty C_n\sin(\frac{n\pi x}{4})=v(x)-f(x). $$ Using $$ \frac1{\sqrt{2}}\int_0^4\sin\sin(\frac{m\pi x}{4})\sin(\frac{n\pi x}{4})dx=\delta_{mn} $$ one has $$ C_n=\sqrt2\int_0^4(v(x)-f(x))\sin(\frac{n\pi x}{4})dx. $$

  • $\begingroup$ Nice solution, however this does not adress the question I stated. Also, I think you forgot to divide that last integral for $c_n$ with the norm of $\sin(n\pi x/4)$?. $\endgroup$ – Parseval Feb 28 at 19:11
  • $\begingroup$ @Parseval, That's right. $\endgroup$ – xpaul Feb 28 at 19:56
  • $\begingroup$ @Parseval, I did not read carefully. $\endgroup$ – xpaul Feb 28 at 19:57
  • $\begingroup$ @Parseval, see the update. $\endgroup$ – xpaul Feb 28 at 20:08
  • $\begingroup$ Thanks, but you still have not explained why $u(x,0)=v(x)-f(x).$ Or maybe I'm not seeing where you have done it? $\endgroup$ – Parseval Feb 28 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.