Numerical Computing - Problem Review

1. Calculate the calculation amount of the matrix

2. Find the relative error limit

3. Calculate the absolute error limit and relative error limit according to the maximum error

 ⚠️Why use differentiation?

        Absolute error is computed by differential approximation based on the idea that if we consider a function near a point, then the behavior of the function near that point can be approximated by a tangent to that point. This is the basic concept of differentiation and the basis of differential approximation.

        More specifically, suppose we have a function y = f(x), and we know that a small change Δx in x will result in a change Δy in y. If Δx is small enough, then we can approximate Δy by taking the derivative of the function at x. This is the so-called differential approximation and can be written mathematically as:

Δy ≈ dy = f'(x)Δx

        In this problem, we want to calculate the absolute error of the volume of the cube. The volume V of a cube is a function of the side length a, V=a^3. So, if there is a small change δa in side length a, there will be a change δV in volume V, which we can calculate by differential approximation:

δV ≈ dV = 3a^2δa

        That's why we can calculate absolute error by differential approximation.

⚠️Why is the differential of x 0.01cm?

        The value of δa=0.01 cm is set according to the conditions given in the title. This is a maximum allowable error, which is used to ensure that the size of the produced cube is within an acceptable range. And the differential must ensure that Δx is small enough without exceeding its error, so the differential of x at this time must be 0.01cm.

4. The Qin Jiushao algorithm of cosx deduces the recursive formula of the first n items

Code: The programming design function COSTNV(x,n) finds the sum of the first n items as follows

double PolyValue(double x,int n)
{  	int     K;
double y=1.0,xx;
K=n*2;		xx=x*x;
  	while(K>0)
{	y=1.0-y*xx/K/(K-1);
	K-=2 ;
}
  	return y;

5. The Qin Jiushao algorithm of Logx deduces the recursive formula of the first n items 

Code: The programming design function LOGTNV(x,n) finds the sum of the first n items as follows

double LOGTNV(double x,int n)
{  	int K,NK;
  	double xx,y;
  	NK=n*2+1;
  	xx=x*x;
  	y=1.0/NK;
 	 for(K=n;K>0;K--)
  	{	 NK-=2;
    	y =1.0/NK+xx*y;
 	 }
  	return y;
}

A summary of Qin Jiushao's calculation of the Taylor expansion recursion formula:

(1) When extracting the common factor of cosx and sinx, don't forget to extract the negative sign of each item

(2) When k=n,n-1...2,1 is recorded at the end, each summary item represents an item of k

(3) Generally speaking, the summary formula of yk is related to the nth item of the Taylor expansion after Qin Jiushao algorithm processing

(4) The agreed value of yn+1 is the coefficient for extracting the common cause item in the last item

6. Deduce the absolute error limit of the function according to the absolute error limit of the Taylor expansion

 ⚠️The simplification of the last two expansions here is based on the Taylor expansion. Simplify according to the following formula :

        Simplify by replacing x with x/n.

7. Interval bisection method to find ⚽️interval zero point (1)

8. Interval bisection method ⚽️ Interval zero point (2)

9. The minimum value of the golden section method ⚽️ interval (1)

10. Golden section method ⚽️ Interval minimum (2)

11. Use the Gaussian elimination method to solve the solution of the equation system (1)

12. Use Gaussian elimination method to solve the solution of equations (2) 

Guess you like

Origin blog.csdn.net/m0_56190554/article/details/130902020