How do I do number 3?
Number 3
Here's a quick overview of how I did it.
Using separation of variables I got that the time function was $C e^{-\lambda t}$.
I then applied the left boundary to get that the spatial function was $B\cos(\lambda x)$.
Applying the right boundary I received $\lambda=\frac{2n+1}{2}\pi$
I then set up the heat function as an infinite series
$$u(x,t)=\sum_{n=0}^\infty C_n\cos\left(\frac{2n+1}{2}\pi x\right)e^{-\left(\frac{2n+1}{2}\pi\right)^2t}$$
and using the initial condition and what we know about Fourier series found
$$C_n=\frac{8}{(\pi+2n\pi)^2}$$
Which gave me my final answer of
$$u(x,t)=\sum_{n=0}^\infty \frac{2}{(\frac{2n+1}{2}\pi)^2}\cos\left(\frac{2n+1}{2}\pi x\right)e^{-\left(\frac{2n+1}{2}\pi\right)^2t}$$
though it looks nicer if you specify $n$ as odd, or use $\lambda$s:
$$u(x,t)=\sum_{n=0}^\infty \frac{2}{(\lambda_n)^2}\cos\left(\lambda_n x\right)e^{-\left(\lambda_n\right)^2t}$$
where $\lambda_n=\frac{n\,\pi}{2}$, and with $n$ odd.
Maybe I'm missing something, but I'm confused about how you found $C_n$. What intermediate calculation did you do?
I can give more detail later, but I used the second magnanimous hint on the worksheet.
Well seeing as how our quiz is in like an hour and a half, the quicker the better. Because I know a lot of people are pretty confused on how to do number 3.
@dwillia2, I'm confused on the steps you took to find your initial function. Maybe I'm just not following, but if you could elaborate more on the actual work to get the answer I would really appreciate it.
So I'm writing a more detailed answer right now, but I will basically be copying (and was tempted to flat out quote it in) the first few equations from the notebook called "Full Fourier series". Find it here. We already have $u(x,t)$ as a Fourier cosine series so we can almost directly apply the equations for the coefficients.
$$u(x,t)=\sum_{n=0}^\infty C_n\cos\left(\frac{2n+1}{2}\pi x\right)e^{-\left(\frac{2n+1}{2}\pi\right)^2t}$$
We also know $u(x,0)=1-x$ so we can plug in $t=0$ (notice the $e$ portion goes away) for our series and then set it equal to $1-x$.
$$1-x=\sum_{n=0}^\infty C_n\cos\left(\frac{2n+1}{2}\pi x\right)$$
Just for a second let $m=\frac{2n+1}{2}\pi$ Then we have
$$1-x=\sum_{n=0}^\infty C_n\cos\left(m x\right)$$
Well this is exactly the same as the fourier series in the notebook for $b_n=0$
$$\sum _{n=1}^{\infty } \left(a_n (\cos (\frac{\pi n x}{L}))+b_n (\sin (\frac{\pi n x}{L}))\right)+\frac{a_0}{2}$$ (The formatting is terrible I know)
So we can use
$$a_n=(1/L)\int_{-L}^L (f x) (\cos (\frac{\pi m x}{L})) \, dx$$
Which turns out to be exactly the second magnanimous hint when you plug in $m$ and $L$.
Keep in mind though, that you would need to use IBP to do these by hand and it isn't unreasonable to expect us to be able to do it. Also I think $a_0=0$ but that is off of memory, it might be wrong.
@csorrell Do you mean the time and spatial functions or heat function?
If you mean the heat function the intermediate step would be
$$u(x,t)=X(x)T(t)$$
$$u(x,t)=CB\cos(\lambda x)e^{-\lambda t}$$
But $\lambda$ has an infinite number of possibilities, each of which could add to our overall function. So to account for that lets make it an infinite series where $CB=C_n$. Each $C_n$ will give a weighting to the functions of $\lambda$ creating an weighted linear (I think linear) combination.
$$u(x,t)=\sum_{n=0}^\infty C_nX(x)T(t)$$
Which comes out to that original function.
(I hope that answers your question.)
You can probably find a more thorough (and mathematically specific/correct) explanation in the "Intro to Fourier Series" or "Full Fourier Series" notebooks
I'm slightly confused by your solution to the time dependence equation. When I did this, separation of the solution resulted in
$$
X(x) T'(t) = X''(x)T(t)
\\
\Rightarrow \frac{1}{X}X'' = \frac{1}{T} T' = - \lambda^2
$$
where $- \lambda^2$ is a particularly advantageous way to write the constant. This produces two ODEs,
$$
X'' = - \lambda^2 X
\\
T' = - \lambda^2 T.
$$
The equation for $X$ involved two-derivatives, so the natural solutions are sines and cosines with frequency $\lambda$, but the equation for $T$ involved only one derivative, so it's solution is $Ce^{-\lambda^2 t}$. Once you found $\lambda$ explicitly you applied it this way, but your general solution has the form $Ce^{\lambda t}$. Unless I am mistaken myself, I think you just wrote the wrong thing down, but I included a lot of detail here in case it is helpful.
Woops! Thanks, fixed.