Problem 7

Question

Use the finite difference method and the indicated value of \(n\) to approximate the solution of the given boundary-value problem. $$ x^{2} y^{\prime \prime}+3 x y^{\prime}+3 y=0, \quad y(1)=5, y(2)=0 ; n=8 $$

Step-by-Step Solution

Verified
Answer
Approximate the solution using finite difference and solve the linear system created.
1Step 1: Set Up the Finite Difference Grid
First, we determine the grid by dividing the interval \([1, 2]\) into 8 equal parts. The step size \( h \) will be \( h = \frac{2 - 1}{8} = \frac{1}{8} = 0.125 \). The grid points will be \( x_i = 1 + i \times h \) for \( i = 0, 1, ..., 8 \). Thus, the grid points are \( 1, 1.125, 1.25, 1.375, 1.5, 1.625, 1.75, 1.875, 2 \).
2Step 2: Discretize the Differential Equation
We use finite differences to approximate derivatives: - Approximate \( y' \) by \( \frac{y_{i+1} - y_{i-1}}{2h} \) - Approximate \( y'' \) by \( \frac{y_{i+1} - 2y_{i} + y_{i-1}}{h^2} \).Substitute these into the equation: \( x_i^2 \left( \frac{y_{i+1} - 2y_{i} + y_{i-1}}{h^2} \right) + 3x_i \left( \frac{y_{i+1} - y_{i-1}}{2h} \right) + 3y_i = 0 \).
3Step 3: Simplify and Formulate the System of Equations
Re-arrange the equation from Step 2:\( x_i^2 y_{i+1} - [2x_i^2 - 3x_ih]y_{i} + x_i^2 y_{i-1} + 3hy_{i+1} - 3hy_{i-1} + 3h^2y_i = 0. \)For each internal grid point \( i = 1 \) to \( i = 7 \), you will have one equation.
4Step 4: Apply Boundary Conditions
Substitute the boundary conditions given: \( y(1) = y_0 = 5 \) and \( y(2) = y_8 = 0 \) into the system of equations to replace any terms with \( y_0 \) or \( y_8 \) by their boundary values. These conditions help in simplifying the system by setting known values at the ends.
5Step 5: Solve the System of Equations
The system of linear equations derived above involves variables \( y_1, y_2, ..., y_7 \). Use methods like Gaussian elimination or matrix algebra to solve this system for the values of \( y_i \). By solving, you obtain the approximate values for the grid points y.

Key Concepts

Boundary-value problemFinite difference gridNumerical approximationDifferential equation discretization
Boundary-value problem
A boundary-value problem in mathematics involves finding a solution to a differential equation subject to specific conditions known as boundary conditions. These are important because they dictate the behavior of the solution at the boundaries of the domain. In our exercise, the boundary-value problem is given by the differential equation:
  • \( x^{2} y^{\prime \prime}+3 x y^{\prime}+3 y=0 \)
The conditions set are \( y(1)=5 \) and \( y(2)=0 \), which we must satisfy for the solution across the interval from 1 to 2.
The challenge in a boundary-value problem is not just finding any solution, but finding one that meets these endpoint requirements. This makes it distinct from initial value problems, where conditions are only given at one point. Boundary-value problems often require numerical methods to solve when an analytical solution is difficult or impossible to find.
Finite difference grid
The finite difference grid is a crucial part of solving differential equations numerically. It breaks down the continuous domain into discrete points, making it possible to approximate derivatives and solve equations that might otherwise be intractable. In our example, the interval \( [1, 2] \) is divided into 8 equal parts, which defines our grid:
  • Steps from 1 to 2, in increments of 0.125, are our grid points: \( 1, 1.125, 1.25, \, \ldots \, , 2 \).
These grid points allow us to convert the boundary-value problem into a system that can be solved numerically.
Every grid point represents a calculation point for the approximate solution. This discrete model of the problem facilitates computation by turning derivatives into finite differences, which can be handled by algebraic methods.
Numerical approximation
Numerical approximation is an essential technique in the finite difference method, allowing us to estimate solutions to problems that are not easily solvable analytically. This involves estimating the values of the unknown function at each grid point, then refining these estimates iteratively or through direct computation using a set formula.
In the given problem, the function \( y \) is approximated at each node in our grid. By setting up the finite difference representations of the derivatives, we create a system of equations:
  • Substitute approximations like \( y' \approx \frac{y_{i+1} - y_{i-1}}{2h} \) and \( y'' \approx \frac{y_{i+1} - 2y_{i} + y_{i-1}}{h^2} \).
The quality of numerical approximation depends on factors like grid step size and the precise method used to solve the resulting algebraic equations. Smaller step sizes usually lead to more accurate results but at the cost of increased computational effort.
Differential equation discretization
Differential equation discretization is the process of transforming a continuous differential equation into a discrete form. This makes it possible to solve the equation using numerical techniques. In our exercise, we use discretization to convert the differential equation into a series of algebraic equations by approximating derivatives with finite differences.
This transformation involves:
  • Converting \( y'' \) and \( y' \) into algebraic terms with finite differences.
  • Integrating these finite differences into the original equation to create a solvable system.
For example, instead of solving for the continuous derivative \( y'' \), we work with the discrete expression \( \frac{y_{i+1} - 2y_{i} + y_{i-1}}{h^2} \). This approach breaks the problem down into manageable parts, where each equation corresponds to a point on the finite difference grid.
Discretization is powerful because it lets us use computers to solve complex equations, providing approximations where exact solutions might be difficult.