Heat Equation Homework: Find F(x,t)

In summary: This looks like a Fourier sine series. You only need to find the Fourier sine coefficients. So you need to find ##A_n## in terms of ##a_0##.In summary, the function F(x,t) satisfies the partial differential equation \frac{\partial^2 F(x,t)}{\partial x^2}=\frac{\partial F(x,t)}{\partial t} with boundary conditions \frac{\partial F(0,t)}{\partial x}=\frac{\partial F(1,t)}{\partial x} and F(0,t) = F(1,t). The function F(x,0) is given by x^2 for x in the interval (0,1). Using separation of variables, we
  • #1
Gregg
459
0

Homework Statement



F(x,t) satisfies

[tex] \frac{\partial^2 F(x,t)}{\partial x^2}=\frac{\partial F(x,t)}{\partial t} [/tex]

With the following boundary conditions

[tex] \frac{\partial F(0,t)}{\partial x}=\frac{\partial F(1,t)}{\partial x} [/tex]

[tex]F(0,t) = F(1,t) [/tex]

[tex] F(x,0) = x^2 \text{ for } x \in (0,1) [/tex]

The Attempt at a Solution



I've assumed it's separation of variables but I am unsure if I can do this

If it is

[tex] F(x,t) = \phi(x) G(t) [/tex]

I end up with

[tex] \frac{d^2\phi}{d x^2} +\lambda \phi = 0 [/tex]

[tex] \frac{dG}{dt} = -\lambda G [/tex]

So

[tex] \phi(x) = c_1 \cos(x\sqrt{\lambda}) + c_2 \sin(x\sqrt{\lambda}) [/tex]

I also got that the constants are

[tex] c_1 = -\frac{1+\cos(\sqrt{\lambda})}{\sin(\sqrt{\lambda})} [/tex]

[tex] c_2 = \frac{1+\cos(\sqrt{\lambda})}{\cos(\sqrt{\lambda})-1} [/tex]

unsure where to go from here in terms of the function phi. lambda denotes eigenfunctions?
 
Physics news on Phys.org
  • #2
Gregg said:

Homework Statement



F(x,t) satisfies

[tex] \frac{\partial^2 F(x,t)}{\partial x^2}=\frac{\partial F(x,t)}{\partial t} [/tex]

With the following boundary conditions

[tex] \frac{\partial F(0,t)}{\partial x}=\frac{\partial F(1,t)}{\partial x} [/tex]

[tex]F(0,t) = F(1,t) [/tex]

[tex] F(x,0) = x^2 \text{ for } x \in (0,1) [/tex]


The Attempt at a Solution



I've assumed it's separation of variables but I am unsure if I can do this

If it is

[tex] F(x,t) = \phi(x) G(t) [/tex]

I end up with

[tex] \frac{d^2\phi}{d x^2} +\lambda \phi = 0 [/tex]

[tex] \frac{dG}{dt} = -\lambda G [/tex]

So

[tex] \phi(x) = c_1 \cos(x\sqrt{\lambda}) + c_2 \sin(x\sqrt{\lambda}) [/tex]

Good. I hope you know Fourier series.

Now, [itex]\lambda[/itex] is the separation constant, so we can choose. Write

[tex]\lambda=n^2\pi^2[/tex]

to simplify our notation. (it will appear later why we chose this).

Can you solve

[tex]\frac{dG}{dt}+\lambda G=0[/tex]

for this choice of [itex]\lambda[/itex]??

Now, our boundary conditions are F(0,t)=F(1,t) and another boundary condition is F(0,0)=0 (forget about all the rest for a second). What does that imply for [itex]\phi[/itex]?? Can you use it to find the constants?
 
  • #3
Why can we choose to write that for lambda?

[tex]\frac{dG(t)}{dt}+\lambda G(t)=0[/tex]

so

[tex]G(t) = A \exp(-\lambda t) [/tex]

[tex] G(t) = A \exp( -n^2\pi^2 t) [/tex]
 
  • #4
[tex] F(0,t) = F(1,t) \Rightarrow c_1=0 [/tex]

you get [tex]c_1 = -c_1 [/tex]
[tex]F(0,0)=0[/tex] does not put any extra constraint on the constants since the sine vanishes at zero.
for [tex] \frac{\partial F(0,t)}{\partial x} = \frac{\partial F(1,t)}{\partial x} [/tex]

I seem to get [tex] c_2 = c_2 \cos (n \pi ) [/tex]
 
  • #5
Gregg said:
Why can we choose to write that for lambda?


Because lambda is arbitrary. Every value of lambda gives rise to another solution. So I choose [itex]\lambda=n^2\pi^2[/tex]. This special choice will give us the solution we want. So other lambda's don't interest us.

Gregg said:
[tex] F(0,t) = F(1,t) \Rightarrow c_1=0 [/tex]

I don't see how you can deduce this. The only thing that you get from this is

[tex]\phi(0)=\phi(1)[/tex]

right? Which is always satisfied.

Now, F(0,0)=0 gives something interesting.
 
  • #6
Gregg said:
Why can we choose to write that for lambda?

I would say choosing ##\lambda## there is putting the cart before the horse. You have$$
\phi''(x)+\lambda\phi(x) = 0$$ $$
\phi(0)=\phi(1),\ \phi'(0) = \phi'(1)$$You want to consider the three cases ##\lambda=\mu^2>0,\ \lambda = 0,\ \lambda = -\mu^2 < 0##. I think you will find ##\lambda > 0## gives only trivial solutions while ##\lambda = 0## gives a constant. Let's look more closely at ##\lambda = \mu^2 > 0##. This gives$$
\phi(x) = A\cos(\mu x)+ B\sin(\mu x)$$ $$
\phi'(x) = -A\mu \sin(\mu x)+ B\mu\cos(\mu x)$$Your boundary conditions give these two equations:$$
A(1-\cos \mu)-B\sin \mu = 0$$ $$
A\sin\mu + B(1-\cos\mu)=0$$These will have a nontrivial solution for ##A## and ##B## if the determinant of coefficients is zero. That gives the equation ##(1-\cos \mu)^2+\sin^2\mu = 0##. That can happen only if both squares are zero so ##\mu = 2n\pi##. What is interesting here is that, for those values of ##\mu##, both equations are satisfied for all ##A## and ##B##. So what you have for the solutions for ##\phi## are ##\phi_n(x) = A_n\cos(2n\pi x)+ B_n\sin(2n\pi x)## and ##\lambda_n = \mu_n^2 = 4n^2\pi^2##.
 
  • #7
Yes I follow that now, though the bounday conditions for lambda less than or equal to zero seem to give me no constraints on A and B rather than constants or zero. But what about ##A_n## and ##B_n## ?

What happened to Fourier.

Since ## \phi_n (x) ## is a solution I suppose this sum

## \sum_{n=0}^{\infty} \phi_n(x) = \sum_{n=0}^{\infty} A_n \cos (2n \pi x) + B_n \sin (2n\pi x) ##

is a more general solution?

This sort of looks more like a Fourier series, are the constants now needed for the sum to converge?
 
  • #8
I have forgotten about the function ## F(x,t) = \phi(x) G(t)## We have solutions of the form ##F_n(x,t) = (A_n \sin (n \pi x) + B_n \cos (n \pi x) ) c_3 e^{-\lambda t} ##

Ah so we have

##F(x,0) = x^2, ## ##x\in [0,1] ##

So this series

##F(x,0) = \sum_{n=0}^{\infty} \left( A_n \sin (n \pi x) + B_n \cos (n \pi x) \right)= x^2 ##

## x \in [0,1] ##

So that's where Fourier comes in
 
  • #9
Gregg said:
I have forgotten about the function ## F(x,t) = \phi(x) G(t)## We have solutions of the form ##F_n(x,t) = (A_n \sin (n \pi x) + B_n \cos (n \pi x) ) c_3 e^{-\lambda t} ##

Ah so we have

##F(x,0) = x^2, ## ##x\in [0,1] ##

So this series

##F(x,0) = \sum_{n=0}^{\infty} \left( A_n \sin (n \pi x) + B_n \cos (n \pi x) \right)= x^2 ##

## x \in [0,1] ##

So that's where Fourier comes in

You mean$$
\phi_n(x) = \left( A_n \sin (2n \pi x) + B_n \cos (2n \pi x) \right)$$ and $$
G_n(t) = e^{-4n^2\pi^2 t}$$so you are looking for a solution of your PDE like$$
F(x,t) =a_0 + \sum_{n=0}^\infty \phi_n(x)G_n(t)=
a_0 + \sum_{n=0}^\infty \left( A_n \sin (2n \pi x) + B_n \cos (2n \pi x) \right)
e^{-4n^2\pi^2 t}$$It is only now that you can use the condition $$F(x,0)=x^2$$Also I have included a constant term ##a_0##. You need to work the case ##\lambda=0## to verify you get a constant term.
 
  • #10
##\phi''(x) = 0 ## With the boundary conditions you get

##\phi(x) = \c_1##

constant

##dG/dt = 0 ##

so ##G## is constant

But how does this help you get the ##a_0##?
Assuming the solution

##F(x,t) = a_0 + \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] e^{-4n^2\pi^2 t} ##

## F(x,0) = a_0 + \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] ##

## \int_0^1 a_0 \sin (2m\pi x) dx + \int_0^1 \sin (2m\pi x) \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] dx = \int_0^1 x^2 \sin (2m\pi x) dx ##

## \int_0^1 a_0 \cos (2m\pi x) dx + \int_0^1 \cos (2m\pi x) \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] dx = \int_0^1 x^2 \cos (2m\pi x) dx ##

And this should yield the coefficients?

## A_n = \frac{-1}{n \pi} ##
## B_n = \frac{1}{n \pi} ##

Those can't be right I think I've made an error
 
Last edited:
  • #11
Gregg said:
##\phi''(x) = 0 ##


With the boundary conditions you get

##\phi(x) = \c_1##

constant

##dG/dt = 0 ##

so ##G## is constant

But how does this help you get the ##a_0##?

It tells you ##\lambda = 0## is an eigenvalue with ##\phi_0(x) = c## and ##G_0(t) = de^{-0t}## so ##\phi_0(x) G_0(t)= c d = a_0##, some constant. You add that in with the other terms.
Assuming the solution

##F(x,t) = a_0 + \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] e^{-4n^2\pi^2 t} ##

## F(x,0) = a_0 + \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] ##

## \int_0^1 a_0 \sin (2m\pi x) dx + \int_0^1 \sin (2m\pi x) \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] dx = \int_0^1 x^2 \sin (2m\pi x) dx ##

## \int_0^1 a_0 \cos (2m\pi x) dx + \int_0^1 \cos (2m\pi x) \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] dx = \int_0^1 x^2 \cos (2m\pi x) dx ##

And this should yield the coefficients?

## A_n = \frac{-1}{n \pi} ##
## B_n = \frac{1}{n \pi} ##

Those can't be right I think I've made an error

Did you actually calculate those or get them from an answer key? Do you know how to calculate Fourier Coefficients? I may be able to get back to this later this evening.
 
  • #12
i forgot exactly how to go about finding Fourier coefficients. so multiplying by cosine or sine and then integrating I got those, but I think I got mixed up with the integrals.

I found that the Fourier series for x^2 is

## \frac{\pi^2}{30} + \sum_{n=0}^{\infty} \frac{2(-1)^n}{5n} \cos(n\pi x) ##

though Mathematica says it is

##\frac{\pi ^2}{3}-4 \text{Cos}[x]+\text{Cos}[2 x]-\frac{4}{9} \text{Cos}[3 x]+\frac{1}{4} \text{Cos}[4 x]-\frac{4}{25} \text{Cos}[5 x]+\frac{1}{9} \text{Cos}[6 x] \cdots ##

So I know that my coefficients are wrong in my previous post.

What does ## a_0 = \phi_0 G_0 ## actually refer to?So,

## \left|\left(
\begin{array}{cc}
1-\cos (\mu ) & \sin (\mu ) \\
\sin (\mu ) & 1-\cos (\mu )
\end{array}
\right)\right| = -\sin ^2(\mu )+\cos ^2(\mu )-2 \cos (\mu )+1 = 0##
This has solutions ## \mu = 2n\pi ## and ## n\pi+\pi/2 ##

Use the latter...## F(x,0) = a_0 + \sum_{n=1}^{\infty}\left[ A_n \sin \left((n \pi + \frac{\pi}{2})x\right) + B_n \cos \left( (n \pi + \frac{\pi}{2})x \right) \right] ##

## F(x,0) = a_0 + \sum_{n=1}^{\infty}\left[ A_n \cos \left(n \pi x\right) + B_n \sin \left( n \pi x \right) \right] = x^2##

It is an even function so

## F(x,0) = a_0 + \sum_{n=1}^{\infty} A_n \cos \left(n \pi x\right) = x^2##

## F(\frac{1}{2},0) = a_0 = \frac{1}{4} ##

##A_n = \int_{-1}^{1} x^2 \cos (m \pi x ) dx = \frac{4(-1)^m}{m^2 \pi^2} ##apart from the constant is wrong ##a_0 ## I should get ##\frac{1}{3} ##Ahh now it is obvious, integrate both sides between -1 and 1.

## a_0 = \int_{-1}^{1} x^2 dx = \frac{1}{3} ##

## \phi(x) = \frac{1}{3} + \sum_{n=1}^{\infty} \frac{4(-1)^n}{n^2 \pi^2} \cos (n \pi x) ##

## F(x,t) =\left[ \frac{1}{3} + \sum_{n=1}^{\infty} \frac{4(-1)^n}{n^2 \pi^2} \cos (n \pi x) \right] e^{- (n\pi + \frac{\pi}{2})^2 t} ##
 
Last edited:
  • #13
Gregg said:
i forgot exactly how to go about finding Fourier coefficients. so multiplying by cosine or sine and then integrating I got those, but I think I got mixed up with the integrals.

I found that the Fourier series for x^2 is

## \frac{\pi^2}{30} + \sum_{n=0}^{\infty} \frac{2(-1)^n}{5n} \cos(n\pi x) ##

though Mathematica says it is

##\frac{\pi ^2}{3}-4 \text{Cos}[x]+\text{Cos}[2 x]-\frac{4}{9} \text{Cos}[3 x]+\frac{1}{4} \text{Cos}[4 x]-\frac{4}{25} \text{Cos}[5 x]+\frac{1}{9} \text{Cos}[6 x] \cdots ##

So I know that my coefficients are wrong in my previous post.

What does ## a_0 = \phi_0 G_0 ## actually refer to?So,

## \left|\left(
\begin{array}{cc}
1-\cos (\mu ) & \sin (\mu ) \\
\sin (\mu ) & 1-\cos (\mu )
\end{array}
\right)\right| = -\sin ^2(\mu )+\cos ^2(\mu )-2 \cos (\mu )+1 = 0##
This has solutions ## \mu = 2n\pi ## and ## n\pi+\pi/2 ##

No it doesn't. ##\sin^2\mu + (1-\cos\mu)^2## is only zero when both terms are zero. Only ##2n\pi## works.
Use the latter...## F(x,0) = a_0 + \sum_{n=1}^{\infty}\left[ A_n \sin \left((n \pi + \frac{\pi}{2})x\right) + B_n \cos \left( (n \pi + \frac{\pi}{2})x \right) \right] ##

## F(x,0) = a_0 + \sum_{n=1}^{\infty}\left[ A_n \cos \left(n \pi x\right) + B_n \sin \left( n \pi x \right) \right] = x^2##

It is an even function so

## F(x,0) = a_0 + \sum_{n=1}^{\infty} A_n \cos \left(n \pi x\right) = x^2##

## F(\frac{1}{2},0) = a_0 = \frac{1}{4} ##

##A_n = \int_{-1}^{1} x^2 \cos (m \pi x ) dx = \frac{4(-1)^m}{m^2 \pi^2} ##apart from the constant is wrong ##a_0 ## I should get ##\frac{1}{3} ##
That's not all that is wrong. This whole section is wrong for a couple of reasons. You aren't using the correct eigenfunctions and you don't have an even function. You only have the interval (0,1).
Ahh now it is obvious, integrate both sides between -1 and 1.

## a_0 = \int_{-1}^{1} x^2 dx = \frac{1}{3} ##

## \phi(x) = \frac{1}{3} + \sum_{n=1}^{\infty} \frac{4(-1)^n}{n^2 \pi^2} \cos (n \pi x) ##

## F(x,t) =\left[ \frac{1}{3} + \sum_{n=1}^{\infty} \frac{4(-1)^n}{n^2 \pi^2} \cos (n \pi x) \right] e^{- (n\pi + \frac{\pi}{2})^2 t} ##

You need to go back to the earlier equation:$$
F(x,t) =
a_0 + \sum_{n=0}^\infty \left( B_n \sin (2n \pi x) + A_n \cos (2n \pi x) \right)
e^{-4n^2\pi^2 t}$$which gives, when ##t=0## $$
x^2 = a_0 + \sum_{n=0}^\infty \left( B_n \sin (2n \pi x) + A_n \cos (2n \pi x) \right)
$$You can get the correct fomulas for the coefficients by using the orthogonality of the eigenfunctions of (0,1). Have you studied Sturm-Liouville theory?

Edit--I just noticed I had the ##B_n## and ##A_n## switched from the usual use so I changed them here, not that it makes any real difference.
 
Last edited:
  • #14
Ok I don't know what to do. It's Fourier series to solve is it not? Those sin and cosines must be a basis and each of them are orthogonal? So take the inner product (integral on (0,1) ) to eliminate them?
 
  • #15
Gregg said:
Ok I don't know what to do. It's Fourier series to solve is it not? Those sin and cosines must be a basis and each of them are orthogonal? So take the inner product (integral on (0,1) ) to eliminate them?

That's right. This series:$$
x^2 = a_0 + \sum_{k=0}^\infty \left( B_k \sin (2k \pi x) + A_k \cos (2k \pi x) \right)$$ will work. Sturm-Liouville theory guarantees they are orthogonal on (0,1) so just work out the appropriate calculations. For example to calculate ##B_n## multiply both sides by ##\sin(2n\pi x)## and integrate over (0,1) and solve for it. Similarly for the others. While there may be a temptation to use the even extension of ##x^2##, which is itself, on (-1,1), and go for a cosine series, I don't think there is any guarantee these functions form a basis there.
 
  • #16
##A_0 = \int_{0}^{1} x^2 dx = \frac{1}{3}##

## A_n = 2 \int_{0}^{1} x^2 \cos (2 n \pi x) dx = \frac{1}{n^2 \pi^2}##

## B_n = 2 \int_{0}^{1} x^2 \sin (2 n \pi x) dx= -\frac{1}{n \pi}##

##\phi(x) = \frac{1}{3} + \sum_{n=1}^{\infty} \left[ \frac{1}{n^2 \pi^2} \cos(2 n \pi x) - \frac{1}{n \pi} \sin(2 n \pi x) \right]## ?
 
Last edited:
  • #17
Gregg said:
##a_0 = \int_{0}^{1} x^2 dx = \frac{1}{3}##

## A_n = 2 \int_{0}^{1} x^2 \cos (2 n \pi x) dx = \frac{1}{n^2 \pi^2}##

## B_n = 2 \int_{0}^{1} x^2 \sin (2 n \pi x) dx= -\frac{1}{n \pi}##

##\phi(x) = \frac{1}{3} + \sum_{0}^{\infty} \left[ \frac{1}{n^2 \pi^2} \cos(2 n \pi x) - \frac{1}{n \pi} \sin(2 n \pi x) \right]##

Yes. Those coefficients are correct. Your sum should go from 1 to ∞. If you have Maple or similar you can plot the first 10 terms or so and see it converging to the parabola on (0,1).
 
  • #18
LCKurtz said:
$$
F(x,t) =a_0 + \sum_{n=1}^\infty \phi_n(x)G_n(t)=
a_0 + \sum_{n=1}^\infty \left( A_n \sin (2n \pi x) + B_n \cos (2n \pi x) \right)
e^{-4n^2\pi^2 t}$$

Remember that your solution should look like the above with your coefficients in there.
 
Last edited:

FAQ: Heat Equation Homework: Find F(x,t)

1. What is the heat equation and why is it important?

The heat equation is a mathematical equation that describes the transfer of heat in a given system over time. It is important because it allows us to predict and understand how heat will flow in various situations, from simple systems like a metal bar to more complex systems like the Earth's atmosphere.

2. How do I solve a heat equation homework problem?

To solve a heat equation homework problem, you will need to use the appropriate mathematical techniques, such as separation of variables, Fourier series, or Green's functions. You will also need to understand the physical principles behind the problem and apply them correctly in your calculations.

3. What is the significance of the function F(x,t) in the heat equation?

The function F(x,t) represents the initial conditions of the system, such as the temperature distribution at a specific time and location. It is an essential part of the heat equation as it allows us to determine the temperature at any point in the system at any given time.

4. Can the heat equation be applied to real-world situations?

Yes, the heat equation has many real-world applications, including predicting the temperature distribution in materials during manufacturing processes, understanding the Earth's climate, and studying the behavior of heat in buildings and other structures.

5. Are there any limitations to the heat equation?

Yes, the heat equation has limitations, such as assuming a homogeneous and isotropic medium and neglecting external factors that may affect heat transfer. It is essential to understand these limitations when applying the heat equation to real-world problems.

Similar threads

Replies
1
Views
800
Replies
4
Views
1K
Replies
3
Views
1K
Replies
1
Views
1K
Replies
2
Views
661
Replies
1
Views
566
Replies
10
Views
1K
Back
Top