Getting the coefficients of inhomogeneous PDE using Fourier method

In summary, the conversation discusses solving a partial differential equation using the method of separation of variables. The solution is found by splitting it into two separate problems and using superposition to combine them. However, there is a discrepancy in the coefficient term for n=1 and the reason behind it is due to an indetermination in the integral for that value. The solution can still be obtained by doing a special case integral for n=1.
  • #1
Phys pilot
30
0
Homework Statement
$$u_t=ku_{xx}+h \; \;\; \; \; 0<x<1 \; \; \,\; t>0$$

$$u(x,0)=u_0(1-\cos{\pi x}) \; \;\; \; \; 0\leq x \leq 1$$

$$u(0,t)=0 \; \;\; \; \; u(1,t)=2u_0 \; \;\; \; \; t\geq0$$
Relevant Equations
$$u(x,t)=-\frac{hx^2}{2k}+\left(2u_0+\frac{h}{2k}\right)x-\frac{4h}{k\pi}e^{-k\pi^2 t}\sin{\pi x}+ \sum_{n=2}^\infty{a_n e^{-kn^2\pi^2 t}\sin{n\pi x}} $$

$$a_n=\frac{2u_0}{n\pi}[1+(-1)^n]+\frac{2u_0n}{(n^2-1)\pi}[1-(-1)^n]+\frac{2h}{k\pi^3 n^3}[(-1)^n-1]$$
Hello, I posted the same in the partial differential equations section but I'm not getting responses and maybe this section is better for help with homework. I have to solve this problem:

$$u_t=ku_{xx}+h \; \;\; \; \; 0<x<1 \; \; \,\; t>0$$
$$u(x,0)=u_0(1-\cos{\pi x}) \; \;\; \; \; 0\leq x \leq 1$$
$$u(0,t)=0 \; \;\; \; \; u(1,t)=2u_0 \; \;\; \; \; t\geq0$$

So I know that I can split the solution in two (I don't know the reason. I would appreciate a short explanation because we introduce a new function depending just on x and because the sum of the both solutions are also a solution):
$$u(x,t)=v(x,t)+U(x)$$

This give us two different problems.
$$kU''(x)+h=0$$
and
$$v_t=kv_{xx}$$
$$\text{I.C}\begin{cases} v(x,0)=u_0(1-\cos{\pi x})-U(x)\end{cases}$$
$$\text{B.C}\begin{cases} v(0,t)=0 \\ v(1,t)=0 \end{cases}$$

First I can sol the U(x) which is giving me:
$$kU''(x)+h=0$$
$$U(x)=-\frac{hx^2}{2k}+\left(2u_0+\frac{h}{2k} \right)x$$

Now I solve the PDE with the new boundary conditions using the separation of variables and I get:
$$X_n(x)=B_n\sin{n\pi x}$$
$$T_n(t)=C_ne^{-kn^2\pi^2 t}$$
$$v(x,t)=\sum_{n=1}^\infty{=a_ne^{-kn^2\pi^2 t}\sin{n\pi x}}$$

If I apply the initial condition:

$$v(x,0)=\sum_{n=1}^\infty{=a_n\sin{n\pi x}}=u_0(1-cos(\pi x))-U(x)$$

So finally the coefficients should be given by the expression:

$$a_n=2\int_0^1 (u_0(1-cos(\pi x))-U(x))\sin(n \pi x)dx$$

But I'm not gettin the supposed solution which is:
$$a_n=\frac{2u_0}{n\pi}[1+(-1)^n]+\frac{2u_0n}{(n^2-1)\pi}[1-(-1)^n]+\frac{2h}{k\pi^3 n^3}[(-1)^n-1]$$

Actually the supposed solution to the problem is:

$$u(x,t)=-\frac{hx^2}{2k}+\left(2u_0+\frac{h}{2k}\right)x-\frac{4h}{k\pi}e^{-k\pi^2 t}\sin{\pi x}+ \sum_{n=2}^\infty{a_n e^{-kn^2\pi^2 t}\sin{n\pi x}} $$
As you can see the expansion series starts at 2 instead of one so how am I supposed to get the term for n=1 because you can not get it from a_n
 
Physics news on Phys.org
  • #2
Phys pilot said:
I don't know the reason. I would appreciate a short explanation because we introduce a new function depending just on x and because the sum of the both solutions are also a solution
Superposition. You are writing down the solution to an inhomogeneous partial differential equation as the superposition of the stationary state (that does not depend on ##t##) and a non-stationary solution. This will allow you to remove the inhomogeneity from the PDE itself at the expense of introducing an inhomogeneity in the initial conditions (which will essentially be the difference between the initial condition and the stationary state).

The term for ##n = 1## is outside of the sum because it takes a somewhat different form (as you can see). Clearly, the way that the integral is evaluated for ##n \neq 1## does not work for ##n = 1## (the denominator of the second term is zero!) so you need to identify why and do the integral for ##n = 1## explicitly as a special case.
 
  • #3
Orodruin said:
Superposition. You are writing down the solution to an inhomogeneous partial differential equation as the superposition of the stationary state (that does not depend on ##t##) and a non-stationary solution. This will allow you to remove the inhomogeneity from the PDE itself at the expense of introducing an inhomogeneity in the initial conditions (which will essentially be the difference between the initial condition and the stationary state).

The term for ##n = 1## is outside of the sum because it takes a somewhat different form (as you can see). Clearly, the way that the integral is evaluated for ##n \neq 1## does not work for ##n = 1## (the denominator of the second term is zero!) so you need to identify why and do the integral for ##n = 1## explicitly as a special case.
Yes, for n=1 there is an indetermination in the second term of the coefficient. But what integral I'm supposed to do for n=1? I'm lost there, I don't see how to get the term outside of the sum.

Actually, I don't see clearly why the integral doesn't work for n=1. I mean, I know that doesn't work for 1 because I know the supposed solution of the coefficients but without that hint I couldn't see that.
 
  • #4
Phys pilot said:
But what integral I'm supposed to do for n=1? I'm lost there, I don't see how to get the term outside of the sum.

Actually, I don't see clearly why the integral doesn't work for n=1. I mean, I know that doesn't work for 1 because I know the supposed solution of the coefficients but without that hint I couldn't see that.
The same integral, it is just that the integration cannot proceed in the same way as for the other values of n. You should be able to see why if you find out where the ##n^2 - 1## in the denominator comes from.
 
  • Like
Likes Phys pilot
  • #5
Orodruin said:
The same integral, it is just that the integration cannot proceed in the same way as for the other values of n. You should be able to see why if you find out where the ##n^2 - 1## in the denominator comes from.
Ok so I integrated a_1 separately and I got a really similar term $$-4*h/(pi^3k)$$ but the it should be just pi.

The n^2-1 comes from the integration of the cosine. Could you tell me the integral that I am supposed to do? I think I did the right one integrating the expression for a_1 but I'm not sure.
Sorry I'm using my mobile phone and I can not write formulas.
Thanks for the help
 
  • #6
Please show your work.
 
  • #7
Orodruin said:
Please show your work.
Yes, of course. Now I can write formulas.
So I do this integral:
$$a_n=2\int_0^1 (u_0(1-\cos{n\pi})+\frac{h}{2k}x^2-(2u_0+\frac{h}{2k})x)\sin{n\pi x}dx$$
Which is the sum of the following integrals:
$$\int_0^1 2u_0 \sin{n\pi x}dx=-\frac{2u_0}{n\pi}((-1)^n-1)$$
$$\int_0^1 2u_0\cos{\pi x} \sin{n\pi x}dx=-\frac{2u_0n}{\pi(n^2-1)}((-1)^n+1)$$
The result for the next one is strange:
$$\int_0^1 2\frac{h}´{2k} x^2\sin{n\pi x}dx=\frac{h}{\pi^3kn^3}((2-\pi^2n^2)(-1)^n-2)$$
$$\int_0^1 -2\frac{h}´{2k} x\sin{n\pi x}dx=\frac{h}{\pi k n}(-1)^n$$
$$\int_0^1 -4x\sin{n\pi x}dx=\frac{4u_0}{n\pi}(-1)`^n$$
So the coefficients should be the sum of those all 5 terms, which is not equal to the supposed solutions but I don't really mind at the moment if the procedure is correct. So now I have a_n and I see that for a_1 doesn't work because there is a indetermination in the second term. Integrating the same formula but for n=1 (I doubt here, this is what I understood about what you told me):
$$a_1=2\int_0^1 (u_0(1-\cos{\pi})+\frac{h}{2k}x^2-(2u_0+\frac{h}{2k})x)\sin{\pi x}dx$$
$$a_1=\frac{4u_0}{\pi}+0+\frac{(pi^2-4)h}{pi^3k}-\frac{h}{\pi k}-\frac{4u_0}{\pi}=-\frac{4h}{\pi^3k}$$
Which is very similar but not exactly. I just want to know if the way to solve it is like this. If the integral are not correct I can re do it again. Thanks.
 

Related to Getting the coefficients of inhomogeneous PDE using Fourier method

1. How does the Fourier method work for solving inhomogeneous PDEs?

The Fourier method for solving inhomogeneous PDEs involves using the Fourier transform to convert the PDE into an algebraic equation, which can then be solved for the coefficients. This method takes advantage of the fact that the Fourier transform can separate the variables in the PDE, making it easier to solve.

2. What are the advantages of using the Fourier method for inhomogeneous PDEs?

One of the main advantages of using the Fourier method is that it can be applied to a wide range of PDEs, including non-linear and time-dependent equations. It also allows for the use of boundary conditions and initial conditions, making it a versatile method for solving inhomogeneous PDEs.

3. Are there any limitations to using the Fourier method for inhomogeneous PDEs?

While the Fourier method can be applied to many types of PDEs, it may not always be the most efficient or accurate method. In some cases, other numerical methods may be more suitable for solving inhomogeneous PDEs, depending on the specific problem and boundary conditions.

4. What are the steps involved in using the Fourier method for inhomogeneous PDEs?

The first step is to apply the Fourier transform to the PDE, which transforms it into an algebraic equation. Then, the coefficients can be determined by solving the resulting equation. The inverse Fourier transform is then applied to obtain the solution in the original domain.

5. Can the Fourier method be used for PDEs in higher dimensions?

Yes, the Fourier method can be extended to solve inhomogeneous PDEs in higher dimensions. However, the complexity and computational requirements increase as the number of dimensions increases, making it more challenging to apply the method in these cases.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
335
  • Calculus and Beyond Homework Help
Replies
1
Views
451
  • Calculus and Beyond Homework Help
Replies
3
Views
546
  • Calculus and Beyond Homework Help
Replies
1
Views
628
  • Calculus and Beyond Homework Help
Replies
6
Views
490
  • Calculus and Beyond Homework Help
Replies
16
Views
679
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
321
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Back
Top