Series Solution to PDE with Inhomogeneous Term | Step-by-Step Guide

  • #1
Dens
74
0

Homework Statement



Consider the PDE

Hlyva.jpg


which has the solution

YBDDr.png



The Attempt at a Solution




So what I am having trouble is solving it using this method.

I am going to say that my $$u(x,t) = \sum_{n=1}^{\infty} u_n(t) \sin(nx)$$ and $$x \sin(t) = \sum_{n=1}^{\infty}h_n(t)\sin(nx)$$

The reason I chose sine for my inhomogeneous term is because my book recommends it. But I think it is because if I use cosine, I would get a $$\frac{a_0}{2}$$ term and it would be difficult.

To solve for the coefficients of $$h_n(t)$$, I get $$h_n(t) = \frac{2}{\pi}\int_{0}^{\pi} x\sin(t) \sin(nx) dx = \frac{2\sin(t)(-1)^n}{n}$$

Substituting everything into $$u_{tt} = u_{xx} + x\sin(t)$$ gives me


$$ \sum_{n=1}^{\infty}u''_n(t) \sin(nx) + \sum_{n=1}^{\infty}u_n(t)n^2\sin(nx) = \sum_{n=1}^{\infty}\frac{2\sin(t)(-1)^n}{n}\sin(nx)$$


Dividing out that sine, I'll get

$$ \sum_{n=1}^{\infty}u''_n(t) + \sum_{n=1}^{\infty}u_n(t)n^2 = \sum_{n=1}^{\infty}\frac{2\sin(t)(-1)^n}{n}$$

Here is where I am stuck, can someone tell me what value of n to use?

Because I could get an ODE with many ns

Did I overlooked something?

Thank you very much
 
Physics news on Phys.org
  • #2
Why are you saying that

[itex]x sin(t)=\sum_{n=1}^{∞}h_n(t)sin(nx)[/itex]

?

What if you chose a solution that was periodic in time with an unknown function of x, rather than the other way around?
 
Last edited:
  • #3
schliere said:
Why are you saying that

[itex]x sin(t)=\sum_{n=1}^{∞}h_n(t)sin(nx)[/itex]

It's a technique my book uses.
What if you chose a solution that was periodic in time with an unknown function of x, rather than the other way around?
You recommend using $$\sum_{n=1}^{∞}h_n(x)\sin(nt)$$?
 
  • #4
Nevermind, that way should work. However, you seem to have miscalculated your h_n. One trick you can do (if you have time and the ability to do so) is to plot the series (to a reasonable amount of terms) and see if it matches the function you're trying to represent.

Anyway, you're actually on your way. Continue for the "nth" value of n. Basically you take away all the summations and you can solve the second-order ODE for a function of t. You should be able to find the n's in the x function by using the boundary conditions and for the n's in the time function by using the initial conditions.
 
  • #5
schliere said:
Nevermind, that way should work. However, you seem to have miscalculated your h_n. One trick you can do (if you have time and the ability to do so) is to plot the series (to a reasonable amount of terms) and see if it matches the function you're trying to represent.

Anyway, you're actually on your way. Continue for the "nth" value of n. Basically you take away all the summations and you can solve the second-order ODE for a function of t. You should be able to find the n's in the x function by using the boundary conditions and for the n's in the time function by using the initial conditions.

That can't be right because I used WolframAlpha to compute the integral.

http://www.wolframalpha.com/input/?i=Integrate[x*Sin[t]*Sin[n*x]%2C{x%2C0%2CPi}]

The sine disappears because n is an integer
 
  • #6
Alright, I tried a new technique. Instead of worrying about the ns that may vary. I used a substitution $$a = 2\frac{(-1)^n}{n}$$

So my ODE becomes

$$u'' + n^2 u = a\sin(t)$$

Solving http://www.wolframalpha.com/input/?i=u%27%27+%2B+n^2+u+%3D+a*sin[t]

I get

$$u(t) = 2\frac{(-1)^n\sin(t)}{n(n^2 - 1)} + c_1 \sin(nt) + c_2 \cos(nt)$$

Hence

$$u(x,t) = \sum_{n=1}^{\infty} \left (2\frac{(-1)^n\sin(t)}{n(n^2 - 1)} + c_1 \sin(nt) + c_2 \cos(nt) \right )\sin(nx)$$

Okay so my answer now looks MORE identical to the solution. But something is still off
 

Similar threads

Back
Top