# Help with Heat Equation with nonhomogeneous boundary conditions

• Nov 13th 2010, 12:39 AM
11rdc11
Help with Heat Equation with nonhomogeneous boundary conditions
So I'm not sure how to start on this problem.

$\displaystyle u_{t} = u_{xx} +1$
$\displaystyle u(0,t) = 1 ; u_{x}(1,t) = 0$
$\displaystyle u(x,0)=1$

$\displaystyle t>0; 0<x<1$

Where im having my difficulty is finding the steady state solution.

$\displaystyle v''(x) = -\frac{1}{\beta}P(x)$ with P(x) =1

Where do I go from here?
• Nov 13th 2010, 05:12 AM
Jester
If you want steay state (i.e. $\displaystyle t \to \infty$) then solve

$\displaystyle u_{xx} + 1 = 0$ subject to your BC's.
• Nov 13th 2010, 05:18 AM
zzzoak
The steady state solution depends only on x s(x).
Inserting we get

$\displaystyle s_{xx}=-1$

$\displaystyle s(0)=1 \; and \; s_x(1)=0.$

Then we find the solution

$\displaystyle u(x,t)=s(x)+v(x,t)$

defining initial and boundary conditions to v(x,t).
• Nov 13th 2010, 06:39 PM
11rdc11
$\displaystyle r^2=-1$

$\displaystyle r = \pm i$

$\displaystyle s(x) = c_{1}\cos{x} +c_{2}\sin{x}$

$\displaystyle s'(x) = -c_{1}\sin{x} +c_{2}\cos{x}$

$\displaystyle s(0) = 1 ; s'(1)=0$

so

$\displaystyle 1 = c_{1}\cos{0} +c_{2}\sin{0}$

so

$\displaystyle c_{1} = 1$

$\displaystyle 0 = -\sin{1} +c_{2}\cos{1}$

$\displaystyle \sin{1} = c_{2}\cos{1}$

$\displaystyle \tan{1} = c_{2}$

$\displaystyle s(x) = \cos(x) +\tan(1)\sin{x}$
• Nov 13th 2010, 09:51 PM
11rdc11
What would be my next step?

$\displaystyle v_{t} = \beta v_{xx}$

$\displaystyle v(0,t) = 0; v_{x}(1,t) = 0$

$\displaystyle v(x,0) = 1- s(x)$

Separation of variables?

$\displaystyle v(x,t) = X(x)T(t)$

$\displaystyle X''(x) - KX(x) = 0$

$\displaystyle T'(t) - \beta KT(t) = 0$

Case 1 -- K=0

$\displaystyle X(x)= C_{1}x+C_{2}$

using boundary condtions I got

$\displaystyle 0 = C_{1} = C_{2}$

so there exist no nontrivial solution

Case 2 --- K > 0

$\displaystyle X(x) = C_{1}e^{\sqrt{K}x} +C_{2}e^{-\sqrt{K}x}$

using boundary conditions also produces nontrivial solutions.

$\displaystyle 0 = C_{1} = C_{2}$

Case 3 ---- K < 0

$\displaystyle X(x) = C_{1}\cos{\sqrt{-K}x} + C_{2}\sin{\sqrt{-K}x}$

and

$\displaystyle X'(x) = -C_{1}\sqrt{-K}\sin{\sqrt{-K}x} + C_{2}\sqrt{-K}\cos{\sqrt{-K}x}$

and this is where I run into problems again

$\displaystyle 0 = C_1$

which just leaves me with

$\displaystyle 0 = C_{2}\sqrt{-K}\cos{\sqrt{-K}}$

so my question is if

$\displaystyle C_2 = 0$

$\displaystyle \cos{\sqrt{-K}} = \cos{\frac{(2n+1)\pi}{2}}$ for n = 0,1,2,3,...

$\displaystyle K = - \frac{(2n+1)^2 {\pi}^2}{4}$

my question is what does

$\displaystyle \sqrt{-K} = 0$

have?

Can I just consider that a nontrivial solution with $\displaystyle C_2 = 0$?

And am I approaching the problem correctly so far? Thanks in advance
• Nov 13th 2010, 11:31 PM
11rdc11
My last step to finishing if everything is correct is to

$\displaystyle v(x,t) = \sum_{n = 0}^{\infty} c_n e^{(- \frac{(2n+1)^2 {\pi}^2}{4})t}\sin{\frac{(2n+1)\pi x}{2}}$

$\displaystyle 1 - (\cos(x) +\tan(1)\sin{x}) = c_n \sin{\frac{(2n+1)\pi x}{2}}$

which then gives me

$\displaystyle u(x,t) = s(x) + v(x,t)$
• Nov 14th 2010, 04:39 AM
Jester
Quote:

Originally Posted by 11rdc11
$\displaystyle r^2=-1$

$\displaystyle r = \pm i$

$\displaystyle s(x) = c_{1}\cos{x} +c_{2}\sin{x}$

$\displaystyle s'(x) = -c_{1}\sin{x} +c_{2}\cos{x}$

$\displaystyle s(0) = 1 ; s'(1)=0$

so

$\displaystyle 1 = c_{1}\cos{0} +c_{2}\sin{0}$

so

$\displaystyle c_{1} = 1$

$\displaystyle 0 = -\sin{1} +c_{2}\cos{1}$

$\displaystyle \sin{1} = c_{2}\cos{1}$

$\displaystyle \tan{1} = c_{2}$

$\displaystyle s(x) = \cos(x) +\tan(1)\sin{x}$

Look at the ODE again. What you solved was $\displaystyle s_{xx} + s = 0$.
• Nov 14th 2010, 01:19 PM
11rdc11
Thanks Danny,

So the correct

$\displaystyle s(x) = 1 + x - \frac{x^2}{2}$

so

$\displaystyle 1-(1 + x - \frac{x^2}{2}) = c_n \sin{\frac{(2n+1)\pi x}{2}}$

Now im not sure how to finish up. Don't know how to attempt a fourier series with the term $\displaystyle \sin{\frac{(2n+1)\pi x}{2}}$

Do I just do the same as when I'm dealing with with $\displaystyle \sin{\frac{n\pi x}{L}}$?

$\displaystyle c_n = \frac{2}{L} \int_{0}^{L}f(x)\sin{\frac{n\pi x}{L}}$

$\displaystyle c_n = \frac{2}{L} \int_{0}^{L}f(x)\sin{\frac{(2n+1)\pi x}{2L}}$

• Nov 14th 2010, 01:46 PM
Jester

$\displaystyle u_t = u_{xx} + 1$

$\displaystyle u(0,t) = 1, u_x(1,t) = 0, u(x,0) = 1$.

The first boundary condition is a problem so we'll change this problem into a new (do-able) problem.

Let $\displaystyle u = v + ax + b$ and choose $\displaystyle a$ and $\displaystyle b$ such that the new problem is

$\displaystyle v_t = v_{xx} + 1$

$\displaystyle v(0,t) = 0, v_x(1,t) = 0, v(x,0) = ?$

Without the source term ($\displaystyle Q = 1$), separation of a variables would lead to what you have

$\displaystyle \displaystyle v(x,t) = \sum_{n = 0}^{\infty} c_n e^{(- \frac{(2n+1)^2 {\pi}^2}{4})t} $$\displaystyle \; \sin{\frac{(2n+1)\pi x}{2}} Hence we look for a solution of the form \displaystyle \displaystyle v(x,t) = \sum_{n = 0}^{\infty} T_n(t) \sin$$\displaystyle {\frac{(2n+1)\pi x}{2}}$

noting that we'll need a Fourier series of the form

$\displaystyle \sum_{n = 0}^{\infty} q_n \sin{\frac{(2n+1)\pi x}{2}}$

for the source term $\displaystyle Q = 1$

PS. Yes on

$\displaystyle c_n = \frac{2}{L} \int_{0}^{L}f(x)\sin{\frac{(2n+1)\pi x}{2L}}$