PDE, heat equation with mixed boundary conditions

1. Nov 4, 2013

Hakkinen

1. The problem statement, all variables and given/known data
solve the heat equation over the interval [0,1] with the following initial data and mixed boundary conditions.

2. Relevant equations
$\partial _{t}u=2\partial _{x}^{2}u$
$u(0,t)=0, \frac{\partial u}{\partial x}(1,t)=0$

with B.C

$u(x,0)=f(x)$
where f is piecewise with values:
$0, 0<x\leq \frac{1}{2}$
$3, \frac{1}{2}<x<1$

3. The attempt at a solution

after separation of variables where $u(x,t)=h(x)\phi (t)$:

$h''(x)=-\frac{\lambda }{2}h(x)$
$\phi'(t)=-\lambda \phi(t)$

gen. solution to h is
$h(x)=a\sin \sqrt{\frac{\lambda }{2}}$ the constant with the cos term is 0 from initial value

I'm stuck trying to find the eigenvalue
$h'(1)=\frac{\lambda }{2}a\cos\sqrt{\frac{\lambda }{2}}=0$
$\sqrt\frac{\lambda }{2}=\arccos 0$

I'm not sure what expression with n to use for arccos of 0. npi/2 won't work, or (n+1)pi/2, is this the right procedure though?

Any help is greatly appreciated!

EDIT:

I'm trying $\frac{\pi }{2}+n\pi$ now to solve for the eigenvalue

2. Nov 4, 2013

Hakkinen

So for the general solution of u I have $u(x,t)=\sum_{n=1}^{\infty}A_{n}\sin [\frac{\pi}{2}(1+2n)x]\exp -2t[\frac{\pi}{2}(1+2n)]^2$

and the coefficient A_n given by

$A_{n}=\frac{12}{\pi(1+2n)}\cos \pi(1+2n)$

There was another cosine term with pi/2 in the argument that was always zero for any n, but is this an acceptable way to leave the coefficient expression?