Linear Algebra (Sparse Matrix and Diff. Eq)

In summary, the conversation discusses a problem involving finding an approximate numerical solution to a differential equation using a discrete approximation. The problem involves splitting the interval [0,1] into n subintervals and approximating d^2 u(x)/dx^2. The conversation also mentions using different linear algebra methods, such as Gaussian elimination and LU factorization, to solve the problem.
  • #1
dreamspace
11
0

Homework Statement



25uphdd.jpg


Homework Equations



Not sure.

The Attempt at a Solution



Have no idea, as I don't have any/much previous experience with Linear Algebra.
Can anyone help me with starting on this, hints/tips?
 
Physics news on Phys.org
  • #2
Surely you can solve [itex]d^2y/dx^2= 1- x[/itex]? Do you know what LU factorization, Gauss-Seidel, etc. are? What is the matrix with n= 4?
 
  • #3
HallsofIvy said:
Surely you can solve [itex]d^2y/dx^2= 1- x[/itex]? Do you know what LU factorization, Gauss-Seidel, etc. are? What is the matrix with n= 4?

Hi

Yes, I can solve the Differential Equation by hand, and I have some limited knowledge/experience with LU factorization, Gauss-Seidel etc. And matrices in general, but it kinda stops there. I have in general problems understanding how to use everything for the problem, and some of the info included

For example "Xi = i/n is the interior, discrete spatial coordinates on [0,1] with steplength h = 1/n" ? I have no idea what that means, and googling it doesn't come up with a lot either. Neither does searching for Use of sparse matrices and differential equations.
 
  • #4
dreamspace said:
Hi

Yes, I can solve the Differential Equation by hand, and I have some limited knowledge/experience with LU factorization, Gauss-Seidel etc. And matrices in general, but it kinda stops there. I have in general problems understanding how to use everything for the problem, and some of the info included

For example "Xi = i/n is the interior, discrete spatial coordinates on [0,1] with steplength h = 1/n" ? I have no idea what that means, and googling it doesn't come up with a lot either. Neither does searching for Use of sparse matrices and differential equations.

Do you actually understand what the question is about? It is about finding an approximate numerical solution to a DE by using a discrete approximation. So, you split up the interval [0,1] into n subintervals [0,1/n], [1/n,2/n],..., [(n-1)/n,1], then approximate d^2 u(x)/dx^2 by an appropriate finite-difference, etc. If you Google the appropriate topic you will find lots of relevant information. I'll leave that to you.

Anyway, you don't even need to know that to do the question: all you are asked to do is to perform some well-defined linear algebra tasks on a linear system that is given explicitly to you. You don't even need to know where the system comes from.

RGV
 
  • #5
Thanks. Yes, now I understand the problem. But alas, I'm still not sure how the set it up. I'm understanding (correctly?) that the U vector will be the approximate solutions for the Diff. EQ

Let's take the case of N=4 , would the Matrix equation look like this:

[itex]

n^{2}
\begin{pmatrix}
-2 & 1 & 0 & 0 & \cdots & 0\\
1 & -2 & 1 & 0 & \cdots & 0\\
0 & 1 & -2 & 1 & 0 & 0\\
\vdots & \vdots & 1 & \ddots & \\ \\
0 & 0 & & & & 1\\
0 & 0 & & & 1 & -2\\

\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}\\
\vdots\\
u_{n-1}\\
\end{pmatrix}
=
\begin{pmatrix}
f(x_{1})\\
f(x_{2})\\
f(x_{3})\\
\vdots\\
f(x_{n-1})\\
\end{pmatrix}
\\
\\
\\


4^{2}
\begin{pmatrix}
-2 & 1 & 0\\
1 & -2 & 1\\
0 & 1 & -2
\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}
\end{pmatrix}
=
\begin{pmatrix}
f(x_{1})\\
f(x_{2})\\
f(x_{3})
\end{pmatrix}
\\
\\
\\



\begin{pmatrix}
-32 & 16 & 0\\
16 & -32 & 16\\
0 & 16 & -32
\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}
\end{pmatrix}
=
\begin{pmatrix}
1-\frac{1}{4}\\
1-\frac{2}{4}\\
1-\frac{3}{4}
\end{pmatrix}

\\
\\
\\



\begin{pmatrix}
-32 & 16 & 0\\
16 & -32 & 16\\
0 & 16 & -32
\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}
\end{pmatrix}
=
\begin{pmatrix}
\frac{3}{4}\\
\frac{1}{2}\\
\frac{1}{4}
\end{pmatrix}

[/itex]

?
 
  • #6
dreamspace said:
Thanks. Yes, now I understand the problem. But alas, I'm still not sure how the set it up. I'm understanding (correctly?) that the U vector will be the approximate solutions for the Diff. EQ

Let's take the case of N=4 , would the Matrix equation look like this:

[itex]

n^{2}
\begin{pmatrix}
-2 & 1 & 0 & 0 & \cdots & 0\\
1 & -2 & 1 & 0 & \cdots & 0\\
0 & 1 & -2 & 1 & 0 & 0\\
\vdots & \vdots & 1 & \ddots & \\ \\
0 & 0 & & & & 1\\
0 & 0 & & & 1 & -2\\

\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}\\
\vdots\\
u_{n-1}\\
\end{pmatrix}
=
\begin{pmatrix}
f(x_{1})\\
f(x_{2})\\
f(x_{3})\\
\vdots\\
f(x_{n-1})\\
\end{pmatrix}
\\
\\
\\


4^{2}
\begin{pmatrix}
-2 & 1 & 0\\
1 & -2 & 1\\
0 & 1 & -2
\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}
\end{pmatrix}
=
\begin{pmatrix}
f(x_{1})\\
f(x_{2})\\
f(x_{3})
\end{pmatrix}
\\
\\
\\



\begin{pmatrix}
-32 & 16 & 0\\
16 & -32 & 16\\
0 & 16 & -32
\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}
\end{pmatrix}
=
\begin{pmatrix}
1-\frac{1}{4}\\
1-\frac{2}{4}\\
1-\frac{3}{4}
\end{pmatrix}

\\
\\
\\



\begin{pmatrix}
-32 & 16 & 0\\
16 & -32 & 16\\
0 & 16 & -32
\end{pmatrix}

\begin{pmatrix}
u_{1}\\
u_{2}\\
u_{3}
\end{pmatrix}
=
\begin{pmatrix}
\frac{3}{4}\\
\frac{1}{2}\\
\frac{1}{4}
\end{pmatrix}

[/itex]

?

So now you are expected to solve this problem by a number of different methods. The first, Gaussian elimination (= LU factorization!) is familiar from beginning high-school algebra. The others are supposed to be what you are learning in the course, I think, judging from the wording of the problem.

RGV
 

Related to Linear Algebra (Sparse Matrix and Diff. Eq)

What is a sparse matrix in linear algebra?

A sparse matrix is a matrix in which most of the elements are zero. This means that the matrix contains mostly empty or unused space. In contrast, a dense matrix contains mostly non-zero elements.

Why are sparse matrices important in linear algebra?

Sparse matrices are important because they allow for more efficient storage and manipulation of large matrices. Since most of the elements are zero, storing and computing operations on sparse matrices require less memory and computation time compared to dense matrices.

What are some common applications of sparse matrices?

Sparse matrices are often used in fields such as data science, machine learning, and scientific computing. They are particularly useful in problems that involve large amounts of data or require solving systems of linear equations.

What is a differential equation in linear algebra?

A differential equation is a mathematical equation that relates an unknown function to its derivatives. It describes the relationship between a function and its rate of change over time or space.

How are differential equations solved using linear algebra?

Differential equations can be solved using linear algebra by converting them into a system of linear equations. This involves representing the derivatives as linear operators and using techniques such as matrix multiplication and Gaussian elimination to solve for the unknown function.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
829
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
134
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
15
Views
840
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
585
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
Back
Top