# The heat equation in one dimension w/ ihomogeneous boundary conditions

1. Apr 17, 2014

### Jdraper

1. The problem statement, all variables and given/known data
I have been given a complex function

I have been given a complex function

$\widetilde{U}$(x,t)=X(x)e(i$\omega t)$

Where X(x) may be complex

I have also been told that it obeys the heat equation

$\frac{\partial\widetilde{U}}{∂t}$=[STRIKE]$\kappa$[/STRIKE]2($\frac{\partial\widetilde{U}}{∂x}$)^2 (second differential, had trouble inputting it)

and i have been given a single boundary condition

$\widetilde{U}$(0,t)=X(x)e(i$\omega t$)

I have also been told that U(x,t)=V(x)cos(ωt)+W(x)sin(ωt) is the real part of $\widetilde{U}$

Which i have proved, but I don't think the proof is necessary to solve my problem. (ask and i will post if you think it may be helpful)

Now, I have been asked to show that the general solution for X is

X(x)=c1 exp(-$\alpha$*$\sqrt{(ω/2κ^2)}$*x) + c1 exp($\alpha$*$\sqrt{(ω/2κ^2)}$*x)

And then find the value for $\alpha$

2. Relevant equations

3. The attempt at a solution
My first thought was to try seperation of variables to solve it. So using the ansatz y(x,t)=X(x)T(t)
I found the equation X''-λX=0, which when solved gives the solutions

Xn (x)=A2 sin(n$\pi x$ / L) This was obviously no use as i don't have a second boundary condition to provide me with L, Also it is a trignometric not an exponential function.

Then i realized that I couldn't solve it by seperation of variables as the boundary conditions are functions of time. Therefore i need to solve it using techniques for inhomogenous boundary conditions.

From what i understand, solving inhomogenous boundary conditions involves constructing a particular solution yp (x,t) that satisfies the boundary conditions but not the heat equation. When combining this into the combined solution:

y(x,t)= yp (x,t) + v(x,t) where v vanishes at the boundary

it doesn't solve the heat equation i have written above but the inhomogenous heat equation:

$\frac{\partial\widetilde{U}}{∂t}$=[STRIKE]$\kappa$[/STRIKE]2($\frac{\partial\widetilde{U}}{∂x}$)^2 +F(x,t)

So if someone could help me find the source term F(x,t) to solve the full equation that would be helpful.

Thanks in advance, John

2. Apr 17, 2014

### Staff: Mentor

Just substitute your given complex function into the partial differential equation, and see what you get. This should get you started.

Chet

3. Apr 17, 2014

### Jdraper

The partial differential equation with the source term F(x,t), or the one without it?

4. Apr 17, 2014

### Staff: Mentor

The problem statement says to do it without the source term.

This is the analysis you do to solve the problem of transient conduction in a semi-infinite slab with a periodic temperature variation at the boundary.

Chet

5. Apr 17, 2014

### Jdraper

ok with that substitution i get:

iωX(x)eiωt = κ2 X''(x)

Rearranging i get,

λ=iω / (κ2) = $\frac{X''(x)}{X(x)}$

Which i believe gives me

X''(x)-(iω/κ2) X(x) = 0

Then I am unable to solve this using the boundary conditions, my notes only show solutions for simple BC's like Dirichlet, Neumann etc. What method is used for solving this problem with the BC i was given:

U˜(0,t)=X(x)e(iωt)

6. Apr 17, 2014

### Staff: Mentor

The above equation should not have an eiωt. It looks like you corrected this below.
Do you know how to find the complementary solution to this equation?
Would it help if I told you that, at x = 0,

U˜(0,t)=X(0)e(iωt)

Chet

7. Apr 18, 2014

### Jdraper

Thanks for the response,

The e(iωt) term was meant to be on both sides and cancel to represent the time dependence. But yes the error was corrected.

I understand that at x=0 U˜(0,t)=X(0)e(iωt), in fact i have written it incorrectly, in my notes it states that at x=0 U˜(0,t)=A0 e(iωt), I think this helps me later on down the page, thanks.

After some Google-ing of complementary I found a few pages saying i should equate u(x,t)=U(x,t)

Note: a u(x,t) is given to me,
U(x,t)=u(x,t)-T0, and i'm also given

u(x,t)=T0 + A0 cos(ωt)

(sorry, should have mentioned this earlier)

u(x,t)=T0 + A0 cos(ωt)

This therefore means:

ut = Ut
ux = Ux
uxx = Uxx

Do i simply sub these values into my standard heat equation and then use separation of variables?

I tried this and was confused as it just left me with the same differential except with u instead of U. (constants disappeared due to differentiation).

I thought then if i made the substitution u for U later it would help, however it didn't. The example i used had a U(x,t) term in the differential equation so the constant had an effect, here it doesn't.

I then found another method where you substitute the U(0,t) term into the substitution.

this mean you get the substitution U(x,t)=u(x,t)+A0 cos(ωt)

when subbing this into the heat equation you get,

ut - uxx = A0 ωsin(ωt)

In the example i'm using i believe they then set u(x,t) equal to a Fourier sine series, I'm unsure why this is and how to use this, any suggestions?

Thanks, John.

8. Apr 18, 2014

### Staff: Mentor

Well, for the complementary solution, I get:

$$X = c_1\exp\left(\sqrt{\frac{iω}{κ^2}}x\right)+c_2\exp\left(-\sqrt{\frac{iω}{κ^2}}x\right)$$
where c1 and c2 are complex. You will notice that there is a square root of i present in the exponentials of both terms. Do you know how to find the square root of i? If so, substitute it into the exponentials. Then, hopefully, it will become apparent to you what to do next.

Chet

9. Apr 18, 2014

### Jdraper

I looked it up and apparently

$\sqrt{i}$ = $\frac{1+i}{ \sqrt{2} }$

Subbing this into your complementary solution i get:

X(x)=c1 exp( $\frac{1+i}{ \sqrt{2} }$ (√ω/√κ2) x)

Absorbing the √2 into the other root you get

X(x)=c$_{1}$ exp((1+i) $\sqrt{ \frac{ω}{2 κ^{2} } }$ ) + c$_{2}$ exp(-(1+i) $\sqrt{ \frac{ω}{2 κ^{2} } }$ )

So it obvious that $\alpha$ is the complex number 1+i, thanks.

However i still don't understand how you got that complementary solution?

Thanks, John

10. Apr 18, 2014

### Jdraper

Just realised you can solve the equation

X''(x)-(iω/κ2) X(x) = 0 by assuming λ≥0 therefore the solution to the equation is

X(x)=c1 exp($\sqrt{λ}$ x) + c2 exp(-$\sqrt{λ}$ x)

As λ=iω / (κ2) and κ and ω are positive this means you get your complementary solution solution, thanks.

Is that all i need to do? It seems a bit simple, i thought i needed to construct a complementary solution and then find the general solution, but the complementary solution you help me find matches the general solution it asks me to find.

11. Apr 18, 2014

### Staff: Mentor

I guess that's all they wanted you to do. But, you shouldn't have had to look up √i. You might have remembered that i = cos(π/2) + i sin(π/2), and then expressed this as an exponential. Then taking the square root is a matter of dividing the exponent by 2.

Chet

12. Apr 18, 2014

### Jdraper

I think i was getting confused between solving for the spatial dependence X and the temperature dependence U. Just proved that $\sqrt{i}$ relation to myself.

Thanks for all your help :)