QUESTION IMAGE
Question
- методом конечных разностей сформировать систему разностных уравнений. using the finite difference method, formulate a system of difference equations
\begin{cases} y - (1 + 4x)y + (1 + x)y = x - 1, & -1 < x < 5 \\\\ y(-1) + 6y(-1) = 1 \\\\ y(5) = 10 end{cases}, \\, h_i = 2
Step1: Define Grid Points
Given \( h = 2 \), interval \( -1 < x < 5 \). The grid points are \( x_0=-1 \), \( x_1 = -1 + 2=1 \), \( x_2=1 + 2 = 3 \), \( x_3=3 + 2 = 5 \). Let \( y_i=y(x_i) \), \( y_i'=\frac{y_{i + 1}-y_{i-1}}{2h} \) (central difference for first derivative), \( y_i''=\frac{y_{i + 1}-2y_i + y_{i-1}}{h^2} \) (central difference for second derivative).
Step2: Substitute into ODE
For \( x = x_1 = 1 \) (since \( x_0=-1 \), \( x_2 = 3 \), \( x_3 = 5 \); we need to handle \( x_1 \) and \( x_2 \) as interior points? Wait, \( h = 2 \), so from \( x=-1 \) to \( x = 5 \), the points are \( -1,1,3,5 \). The ODE is \( y''-(1 + 4x)y'+(1 + x)y=x - 1 \).
First, for \( x = 1 \) ( \( i = 1 \) ):
\( y_1''=\frac{y_2 - 2y_1 + y_0}{2^2}=\frac{y_2 - 2y_1 + y_0}{4} \)
\( y_1'=\frac{y_2 - y_0}{4} \) (since \( h = 2 \), \( 2h = 4 \))
Substitute into ODE:
\( \frac{y_2 - 2y_1 + y_0}{4}-(1 + 4(1))\frac{y_2 - y_0}{4}+(1 + 1)y_1=1 - 1 = 0 \)
Multiply by 4: \( y_2 - 2y_1 + y_0-5(y_2 - y_0)+8y_1 = 0 \)
Simplify: \( y_2 - 2y_1 + y_0-5y_2 + 5y_0+8y_1 = 0 \)
\( -4y_2 + 6y_1 + 6y_0 = 0 \) → \( 2y_2 - 3y_1 - 3y_0 = 0 \) (Equation 1)
For \( x = 3 \) ( \( i = 2 \) ):
\( y_2''=\frac{y_3 - 2y_2 + y_1}{4} \)
\( y_2'=\frac{y_3 - y_1}{4} \)
Substitute into ODE: \( \frac{y_3 - 2y_2 + y_1}{4}-(1 + 4(3))\frac{y_3 - y_1}{4}+(1 + 3)y_2=3 - 1 = 2 \)
Multiply by 4: \( y_3 - 2y_2 + y_1-13(y_3 - y_1)+16y_2 = 8 \)
Simplify: \( y_3 - 2y_2 + y_1-13y_3 + 13y_1+16y_2 = 8 \)
\( -12y_3 + 14y_2 + 14y_1 = 8 \) → \( 6y_3 - 7y_2 - 7y_1 = -4 \) (Equation 2)
Step3: Handle Boundary Conditions
Boundary condition at \( x=-1 \) ( \( x_0 \) ): \( y(-1)+6y'(-1)=1 \). \( y_0 = y(-1) \), \( y'(-1)=\frac{y_1 - y_{-1}}{2h} \), but \( x_{-1} \) does not exist, so we use forward difference? Wait, at \( x=-1 \), the first derivative can be approximated as \( y'(-1)=\frac{y_1 - y_0}{2h} \) (forward difference, since \( x_0=-1 \), \( x_1 = 1 \), so \( y'(-1)\approx\frac{y_1 - y_0}{2h}=\frac{y_1 - y_0}{4} \)
So \( y_0+6\times\frac{y_1 - y_0}{4}=1 \)
Multiply by 4: \( 4y_0 + 6y_1 - 6y_0 = 4 \) → \( -2y_0 + 6y_1 = 4 \) → \( -y_0 + 3y_1 = 2 \) (Equation 3)
Boundary condition at \( x = 5 \) ( \( x_3 \) ): \( y(5)=10 \) → \( y_3 = 10 \) (Equation 4)
Now we have variables \( y_0,y_1,y_2,y_3 = 10 \). From Equation 3: \( y_0 = 3y_1 - 2 \)
Substitute \( y_3 = 10 \) and \( y_0 = 3y_1 - 2 \) into Equation 1:
\( 2y_2 - 3y_1 - 3(3y_1 - 2)=0 \) → \( 2y_2 - 3y_1 - 9y_1 + 6 = 0 \) → \( 2y_2 - 12y_1 + 6 = 0 \) → \( y_2 = 6y_1 - 3 \)
Substitute \( y_3 = 10 \), \( y_0 = 3y_1 - 2 \), \( y_2 = 6y_1 - 3 \) into Equation 2:
\( 6(10)-7(6y_1 - 3)-7y_1=-4 \)
\( 60 - 42y_1 + 21 - 7y_1=-4 \)
\( 81 - 49y_1=-4 \)
\( -49y_1=-85 \) → \( y_1=\frac{85}{49}\approx1.7347 \)
Then \( y_0 = 3\times\frac{85}{49}-2=\frac{255 - 98}{49}=\frac{157}{49}\approx3.2041 \)
\( y_2 = 6\times\frac{85}{49}-3=\frac{510 - 147}{49}=\frac{363}{49}\approx7.4082 \)
But the task is to formulate the system, not solve. So the system of difference equations is:
From Equation 3: \( -y_0 + 3y_1 = 2 \)
From Equation 1: \( 2y_2 - 3y_1 - 3y_0 = 0 \)
From Equation 2: \( 6y_3 - 7y_2 - 7y_1 = -4 \)
With \( y_3 = 10 \)
So the system is:
\(
\)
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The system of difference equations is \(
\) where \( y_0 = y(-1) \), \( y_1 = y(1) \), \( y_2 = y(3) \), \( y_3 = y(5) = 10 \)