# PDE Heat Eq

1. Nov 17, 2014

### joshmccraney

1. The problem statement, all variables and given/known data
$$u_t = ku_{xx} + \sin(2 \pi x / L)$$
$$u_x(0,t) = u_x(L,t) = 0$$
$$u(x,0) = f(x)$$

2. Relevant equations
none (other than the obvious)

3. The attempt at a solution
So i started by taking letting $ku_E''(x) =- \sin(2 \pi x / L)$ (notice from the boundary conditions above I cannot uniquely determine $u_E(x)$). Anyways, let $v(x,t) = u(x,t) - u_e(x)$. This way we make the heat eq without sources. When I do this my boundary conditions become $v_x(0,t) = -u_E'(0) = v_x(L,t)$. Oddly enough, $u_E'(0) = -L/(2 \pi k)$ (after solving for $u_E(x)$ from above). Now I don't have homogenous boundary conditions. So I continued by defining a new function $w(x,t) = v(x,t) - v_E(x) : v_E(x) = L/(2 \pi k) x$ (again, I can't solve uniquely for $v_E(x)$). Am i doing this right so far?

2. Nov 18, 2014

### Orodruin

Staff Emeritus
You are not going to be able to remove the inhomogeneities from both PDE and BC in that manner (simply because the inhomogeneity does not fulfill the BC). I suggest expanding any function as a series in a suitable basis.

3. Nov 18, 2014

### joshmccraney

could you give me an example of what you're talking about here?

4. Nov 18, 2014

### Orodruin

Staff Emeritus
Based on the problem you are trying to solve, I would say you are familiar with Fourier series, yes?

5. Nov 18, 2014

### joshmccraney

Yep, I'm pretty comfortable with them. Why?

6. Nov 18, 2014

### joshmccraney

Make an expansion with the sine term???

7. Nov 18, 2014

### Orodruin

Staff Emeritus
Make an expansion with functions that satisfy the boundary conditions. The sine term does not and so will have to be expanded in these functions as well.

Edit: A good start is to solve the eigenvalue problem $-f_{xx}(x) = \lambda f(x)$ with boundary conditions $f_x(0) = f_x(L) = 0$.

8. Nov 18, 2014

### joshmccraney

Ok, so are you suggesting first make the PDE heat equation with no sources (which makes the BC non-homogenous) and then take the solution to the non-homogenous BC's and make that a series?

So in essence, take $v_{xx} = 0$ which implies $v=ax + b$ and turn this into a fourier series (after they satisfy the BC)?

9. Nov 18, 2014

### Orodruin

Staff Emeritus
I suggest you look at the edit of my previous post. This will give you the eigenfunctions of the $-\partial_x^2$ operator with the given boundary conditions. You can then make an expansion in these functions, i.e., write any function of $x$ in terms of them (if the functions depends on other parameters, the expansion coefficients will depend on these).

10. Nov 18, 2014

### joshmccraney

Sorry, I didn't see your edit. But how do we arrive at your edit? It seems you're using both the heat eq with no sources AND homogenous BC...

11. Nov 18, 2014

### Orodruin

Staff Emeritus
It is only a matter of finding the eigenfunctions of the (in this case 1-dimensional) Laplace operator. Since it is a Sturm-Liouville operator, its eigenfunctions will form an orthogonal basis for the functional space in which your solution must be. So far it has nothing to do with the heat equation other than the heat equation containing this differential operator. The magic is going to happen when you write down the solution as a series in the eigenfunctions.

12. Nov 18, 2014

### joshmccraney

hmmmm, I'll get to work on it and tell you what I get! thanks!

13. Nov 18, 2014

### Orodruin

Staff Emeritus
Just a word of forewarning: You should end up with an infinite set of ODEs. However, these can be solved on a general basis and the solutions introduced into the solution to the full problem.

14. Nov 18, 2014

### joshmccraney

Cool, I think I have a solution. I'd post it but its so long...but thanks for the help!

15. Nov 18, 2014

### Orodruin

Staff Emeritus
So without going further into detail, you should be able to check that it is a solution by simply inserting it into the original PDE.

If you would not mind posting the solution (or at least the main steps and ideas), it would make it possible to check that what you got makes sense.

16. Nov 18, 2014

### Staff: Mentor

I would approach this problem by an entirely different method.

Let u be expressed as the linear sum of two other solutions:

u = u1+u2

where u1 satisfies the PDE and initial condition, but with the generation term equal to zero, and u2 satisfies the PDE with the generation term present, but with the initial condition equal to zero. The solution for u1 is easy to obtain. First get the solution for u1 at long times. Then you will see how to get the rest of the solution.

At long times the solution for u2 will approach a function of x. Find that solution, and then get back with me.

Another trick to aid in solving this problem is to take the partial derivative of the PDE and initial condition with respect to x, and then solve for the partial derivative of u with respect to x (or equivalently the heat flux q) rather than u itself. Then the heat flux can be integrated to get u.

Chet

Last edited: Nov 18, 2014
17. Nov 19, 2014

### exclamationmarkX10

With your first suggestion, how do you get rid of the nagging constant that results from finding the equilibrium solution to the pde with generation term? Also, with your second suggestion, don't you have to assume that the solution is $C^2$ and that $f(x)$ is differentiable?

I think the series solution method is much less convoluted.

18. Nov 19, 2014

### Orodruin

Staff Emeritus
It is essentially equivalent to the series solution, the difference is when you chose to split the inhomogeneities. The ODEs resulting from expansion will have the same inhomogeneities as the original PDE and will be solved by a superposition of a particular and a homogeneous solution. Even if splitting the PDE into two, those two will have to be solved, which can be done by series expansion.

Taking the derivative is perfectly fine. You should simply consider the equation to be a PDE for distributions rather than functions. There will be many physical situations which can be idealized to situations described better by distributions, e.g., point sources, dipoles, etc.

19. Nov 19, 2014

### Staff: Mentor

No problem. What do you get if you integrate the differential equation from x = 0 to x = L, subject to the two boundary conditions?

No. Plus, how do you know it's not.
As a guy with a lot of heat transfer experience, I guarantee the method I'm suggesting is much easier.

Chet

20. Nov 19, 2014

### exclamationmarkX10

Thanks for clearing that up.