I've been posed the following question: enter image description here

I'm trying to solve for the solution to the partial differential equation but cannot seem to get it right.

the question specifies using the "separation of variables method" to solve it

My current attempt includes:

$\theta (x,t) = \sum_{n=1}^{\infty} u_n (x,t)$

$ = \sum_{n=1}^{\infty} (B_n cos \lambda _n t + C_n sin \lambda t) sin (\frac {n \pi x}{2 \pi})$

I'm not quite sure if this is the correct approach or how to solve for the coefficients.

Any help with this question will be greatly appreciated!


This equation can be solved analytically using for instance, the Laplace transform. You can use it as a means to certify your variable separation method.

In large steps, applying the Laplace transform

$$ s^2\Theta(x,s)-\theta(x,0)-s\theta_t(x,0) = \Theta_{xx}(x,s) $$


$$ s^2\Theta(x,s)-6\cos(3x)-s(5+4\cos(4x)) = \Theta_{xx}(x,s) $$

Solving for $x$

$$ \Theta(x,t) = c_1(s) e^{\frac{s x}{3}}+c_2(s) e^{-\frac{s x}{3}}+\frac{4 s^4 \cos (4 x)+5 s^4+6 s^3 \cos (3 x)+324 s^2 \cos (4 x)+1125 s^2+864 s \cos (3 x)+58320}{s \left(s^4+225 s^2+11664\right)} $$

and now we have

$$ \Theta_x(0,s) = \Theta_x(2\pi,s) $$


$$ c_1(s)-c_2(s)=e^{\frac{2 \pi s}{3}} c_1(s)-e^{-\frac{2 \pi s}{3}} c_2(s) $$


$$ c_1(s) = -e^{-\frac{2 \pi s}{3}} c_2(s) $$

and finally

$$ \Theta(x,s) = c_2(s) \left(e^{-\frac{s x}{3}}-e^{\frac{1}{3} s (x-2 \pi )}\right)+\frac{6 \cos (3 x)}{s^2+81}+\frac{4 s \cos (4 x)}{s^2+144}+\frac{5}{s} $$

Here $c_2(s)$ represents the Laplace transform of any $f(t)$. Assuming now $\theta(0,t) = \sin(t)$ we have $c_2(s) = \frac{1}{s^2+1}$ and then

$$ \Theta(x,s) = \frac{e^{-\frac{s x}{3}}-e^{\frac{1}{3} s (x-2 \pi )}}{s^2+1}+\frac{6 \cos (3 x)}{s^2+81}+\frac{4 s \cos (4 x)}{s^2+144}+\frac{5}{s} $$

and anti-transforming

$$ \theta(x,t) = u \left(t-\frac{x}{3}\right) \sin \left(t-\frac{x}{3}\right)-u \left(t+\frac{1}{3} (x-2 \pi )\right) \sin \left(t+\frac{1}{3} (x-2 \pi )\right)+4 \cos (12 t) \cos (4 x)+\frac{2}{3} \sin (9 t) \cos (3 x)+5 $$

where $u(\cdot)$ is the Heaviside step function.

For $f(t) = 0$ as requested, then

$$ \theta(x,t) = 4 \cos (12 t) \cos (4 x)+\frac{2}{3} \sin (9 t) \cos (3 x)+5 $$


For the problem

$$ \theta_{tt}=c^2\theta_{xx},\ \ \theta(0,t) = \theta(L,t) = 0, \ \ \theta(x,0) = \phi(x), \theta_t(x,0) = \psi(x) $$

the variables separation method says that

$$ \theta(x,t) = \sum_{n}^{\infty}\left(a_n\cos\left(\frac{n\pi c t}{L}\right)+b_n\sin\left(\frac{n\pi c t}{L}\right)\right)\sin\left(\frac{n\pi x}{L}\right) $$


$$ a_n = \frac 2L\int_0^L\phi(x)\sin\left(\frac{n\pi x}{L}\right)dx $$


$$ b_n = \frac {2}{n\pi c}\int_0^L\psi(x)\sin\left(\frac{n\pi x}{L}\right)dx $$

Here $L = 2\pi, \ \ c = 3, \ \ \phi(x) = 6\cos(3x),\ \ \psi(x) = 5+4\cos(4x)$


$$ a_n = \frac{12 n (1-\cos (\pi n))}{\pi \left(n^2-36\right)}\\ b_n = \frac{12 \left(n^2-20\right) (1-\cos (\pi n))}{\pi n^2 \left(n^2-36\right)} $$

| cite | improve this answer | |
  • $\begingroup$ i appreciate the reply but im not familiar with the techniques you used and wont be able to input it into the question system im working with (cant input $u(.) is heaviside$) any chance using the "separation of variables" method? $\endgroup$ – lohboys Jun 1 '19 at 22:19
  • 1
    $\begingroup$ @lohboys Please. See attached note. $\endgroup$ – Cesareo Jun 2 '19 at 8:25

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.