Theme 12. Nonlinear equations with one variable

Site: Навчально-інформаційний портал НУБіП України
Course: Computers and Computer Technology (БЦІ). P2 ☑️
Book: Theme 12. Nonlinear equations with one variable
Printed by: Гість-користувач
Date: Monday, 12 May 2025, 10:38 PM

1. Approximate methods for solving equations with one variable

The form of the form f (x) = 0 is called an equation with one variable. If f (x) = 0 is a polynomial of n-degree, then this equation is called algebraic. If n = 1, then such an algebraic equation is called linear. If the equation f (x) = 0 includes trigonometric, logarithmic, index functions, then this equation is called transcendental.

Equations, whose roots are based on the derived formulas, are called equations that are solved in radicals. For algebraic equations above the 4th degree, in the general case, there are no formulas for determining the roots of the equations.

Any number x * ÎX (where X is the domain of definition) is the root of the equation (its solution), if the substitution x * in the equation f (x) = 0 fulfills the equality f (x *) = 0.

The equation may have (figure): 1) only one root; 2) two or more; 3) do not have roots at all; 4) or have their whole set (set).

                       

Approximate methods of numerical solution of equations allow using the finite set of arithmetic operations to find the values ​​of the root. These methods are universal - they do not depend on the type of equation and its coefficients.

Finding the root of the equation consists of two stages:

  • finding of numerical segments (intervals) on which there is only one root - the stage of allocation of the boundary of the existence of the root;
  • finding the root with a predetermined error is a stage for refining the root.

Finding numerical segments (intervals) on which there is only one root can be accomplished by several methods. The most widespread is the graphic method and the method of sequential selection.

The graphic method involves constructing a graph of the function f (x) = 0 and determining the points of the intersection of the graph with the axis of Oh by its image. In the vicinity of the intersection of the graph f (x) = 0 with the axis Oh, there is an interval where the root is.

Clarification of the root for a predetermined error can be accomplished by several methods, for example, bisectures (split in half), simple iterations, chords, tangents, combinations (chords and tangents), etc.

The method of sequencing the definition of the interval with the root of the equation

Let us solve the equation of the form f (x) = 0. To find the solution, you first need to find gaps in which there is only one root of the equation. ACT Maple matter of finding these intervals (segments) is the separation of roots, and most segments have gaps or intervals insulation

The method of sequential search is based on two theorems:

  • If the function f (x) at the ends of the segment [a; b] assumes the values ​​of different characters f (a) * f (b) <0, then in the middle of this interval there exists at least one root xÎ [a; b] such that f (x) = 0.
  • If the first derivative of the function f (x) does not change the sign on the interval [a; b], then the equation f (x) = 0 has only one root.

Output data:

  • continuous function f (x) = 0;
  • pre-set step h.

It is necessary to find the interval xÎ [a; a + h] on which function f (x) = 0 takes values ​​of different characters.

Sequence determination of the interval of the root of the equation:

  • Select the initial value (approximation, based on the content of the task) x = A, where A is the lower limit.
  • Determine the value of the function f (x) for x = A + k * H, where: H - increment; k = 1,2, .. N - the number of steps of the selection.
  • If the value of the function f (x) changes the sign for x = A + (k-1) * H and x = A + k * H, then complete the cycle.
  • The ends of the interval of the root are determined by the values ​​[A + (k-1) * H; A + k * H];
  • In turn, the value x = A + (k-1) * HH / 2 will be the root of the equation f (x) = 0 with the error e = H / 2.

Root refinement by split method (bisect method)

The segment of root isolation [a; b] is divided in half by the point c = (a + b) / 2 and find the value of the function f (c). Of the two segments [a; c] i [c; b] choose such that the function f (x) at the ends of the segment took the value of different characters.

Output data:

  • the interval of the root [a; b] of the equation f (x) = 0;
  • the function f (x) = 0; on the interval [a; b] is continuous;
  • the value of the function f (x) at the ends of the interval [a; b] of different characters, that is: f (a) * f (b) <0;
  • predefined error calculus root e.

It is necessary to find the root x *, which satisfies the equation f (x) = 0 with a predetermined error e.

Sequence of calculation:

  • Determine the approximation of the root value by the formula x = (a + b) / 2.
  • If the condition f (a) * f (x) <0 is executed, then assign b = x otherwise a = x.
  • If condition | ba | <e is executed, then go to point 4, otherwise go to point 1.
  • Output the root value x = (a + b) / 2.

2. Teams of solving equations

For an analytical solution of equations, a team is used

solve (equations, variables).

Variables are listed in curly brackets through a comma. If you do not specify a set of variables in the command parameters, the solution will be found for all the variables involved in the equations. If you need to solve a system of equations, then the equation of the system is indicated in the curly brackets through a comma. The result of using the solve command is a list of solutions of this equation, or, if the equation has no solutions or the command can not be resolved, they will not appear in the output line. With a list of solutions you can work the same way as with a regular list.

Example.

Eq: = (x-1) ^ 3 * (x-2) ^ 2;

S: = solve (eq);

Solve (x ^ 4-11 * x ^ 3 + 37 * x ^ 2-73 * x + 70);

AX: = {2 * x + 3 * y + 2 * z = 7, -2 * x + 2 * yz = 1};

E: = solve (AX);

Rhs (e [1]); subs (e, z);

The subs ( e , z ) command allocates part of the expression. To work with the solution, you could apply the assign ( e) command that executes the assignment of x, y, z of the corresponding values, but x, y, z lose the status of the uncertain variables.

Numerical solution of equations is performed by a team

fsolve (equations, variables, options).

In the options, you can specify the interval in which the search for the roots will be performed; you can also specify complex - to find all complex roots, or the option maxsols = n - to find n the smallest roots of the polynomial. If the equation is given by a polynomial, then the fsolve command will find all the real approximate roots; in the general case, the fsolve command will find only one numerical root of the equation; other roots can be searched by changing the search interval so that the root found in it is not included.

Example.

fsolve (x-cos (x));

fsolve (x ^ 3 + 3 * x-1, x, complex);

Using the solve command, you can also solve inequalities and systems of equations and inequalities.

3. Self-checking

  1. What is called the root of the equation?
  2. What are the equations?
Accessibility

Font Face Font Face

Font Size Font Size

1

Text Colour Text Colour

Background Colour Background Colour

Font Kerning Font Kerning

Image Visibility Image Visibility

Letter Spacing Letter Spacing

0

Line Height Line Height

1.2

Link Highlight Link Highlight