Second order differential equation

  • Thread starter Linder88
  • Start date
  • #1
25
0
Homework Statement:
I need help with finding the approximate solution of a second order differential equation.
Relevant Equations:
I am given the differential equation as in
$$
\lambda \frac{d^2u}{dx^2} + q = 0
$$
which is defined over $$x \in [-L/2,L/2]$$ and where $$q = a+bx$$. I am supposed to find an approximative solution using a spectral method, i.e. using cosine and sine terms that fulfills the essential boundary conditions given by
$$
u \bigg ( -\frac{L}{2} \bigg ) = 0, u \bigg (\frac{L}{2} \bigg ) = 0
$$
The appoximative solution should be represented by a Fourier series and by noticing that the terms in the integral are orthogonal, the matrix of the system of equations should be diagonal.
We choose an approximative solution given by
$$
u_N(x) = \frac{a_0}{2} + \sum_{n=1}^N a_n \cos nx + b_n \sin nx
$$
Comparing this approximative solution with the differential equation yields that
$$
\frac{a_0}{2} = a
$$
and the boundary conditions yields the equation system
$$
a + \sum_{n=1}^N a_n \cos \bigg ( \frac{nL}{2} \bigg ) + b_n \sin \bigg ( \frac{nL}{2} \bigg ) = 0 \\
a + \sum_{n=1}^N a_n \cos \bigg ( -\frac{nL}{2} \bigg ) + b_n \sin \bigg ( -\frac{nL}{2} \bigg ) = 0
$$
So at least I got a system of two equations but I do not know where to go from here. How should I use the orthogonality to set up a matrix from these two equations?
 

Answers and Replies

  • #2
BvU
Science Advisor
Homework Helper
14,511
3,767
Comparing this approximative solution with the differential equation yields that
##{a_0\over 2}=a##
How ?

and the boundary conditions yields the equation system
I miss the ## +bx## from
$$
\lambda \frac{d^2u}{dx^2} + a + bx = 0
$$

(and I find the use of ##a_n## and ##b_n## in your notation confusing, since ##a## and ##b## are allready used).
 
  • #3
pasmith
Homework Helper
2,075
696
Homework Statement:: I need help with finding the approximate solution of a second order differential equation.
Relevant Equations:: I am given the differential equation as in
$$
\lambda \frac{d^2u}{dx^2} + q = 0
$$
which is defined over $$x \in [-L/2,L/2]$$ and where $$q = a+bx$$.

I am supposed to find an approximative solution using a spectral method, i.e. using cosine and sine terms that fulfills the essential boundary conditions given by
$$
u \bigg ( -\frac{L}{2} \bigg ) = 0, u \bigg (\frac{L}{2} \bigg ) = 0
$$
The appoximative solution should be represented by a Fourier series and by noticing that the terms in the integral are orthogonal, the matrix of the system of equations should be diagonal.

We choose an approximative solution given by
$$
u_N(x) = \frac{a_0}{2} + \sum_{n=1}^N a_n \cos nx + b_n \sin nx
$$
Comparing this approximative solution with the differential equation yields that
$$
\frac{a_0}{2} = a
$$

No. It's the second derivative of [itex]u[/itex] that is equal to [itex]\frac{-q(x)}{\lambda}[/itex], not [itex]u[/itex] itself. When you differentiate the constant term you get zero, and in any case a non-zero constant does not satisfy the boundary condition.

and the boundary conditions yields the equation system
$$
a + \sum_{n=1}^N a_n \cos \bigg ( \frac{nL}{2} \bigg ) + b_n \sin \bigg ( \frac{nL}{2} \bigg ) = 0 \\
a + \sum_{n=1}^N a_n \cos \bigg ( -\frac{nL}{2} \bigg ) + b_n \sin \bigg ( -\frac{nL}{2} \bigg ) = 0
$$
So at least I got a system of two equations but I do not know where to go from here. How should I use the orthogonality to set up a matrix from these two equations?

You have [itex]u(x) \approx \sum_n u_n\phi_n(x)[/itex] where [tex]
\phi_n(-L/2) = \phi_n(L/2) = 0.
[/tex] Therefore [tex]
\lambda \sum_n u_n \phi_n''(x) \approx -q(x)[/tex] and we determine the [itex]u_n[/itex] by requiring that the inner product with [itex]\phi_m[/itex] should be exact, ie. [tex]
\lambda \sum_n u_n \int_{-L/2}^{L/2} \phi_n''(x) \phi_m(x)\,dx = -\int_{-L/2}^{L/2} q(x)\phi_m(x)\,dx.[/tex] The matrix you are looking for is the matrix of coefficients [tex]
M_{mn} = \int_{-L/2}^{L/2} \phi_n''(x) \phi_m(x)\,dx.[/tex]

Now the choice of a fourier basis means that [tex]\phi_n(x) = A_n\cos(k_n x) + B_n\sin(k_n x)[/tex] and [itex]k_n[/itex] is such that the boundary conditions are satisfied by something other than [itex]A_n = B_n = 0[/itex].
 
Last edited:

Related Threads on Second order differential equation

  • Last Post
Replies
1
Views
512
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
5
Views
944
  • Last Post
Replies
1
Views
853
  • Last Post
Replies
1
Views
751
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
1
Views
986
  • Last Post
Replies
2
Views
1K
Top