04.03. Finding Approximate Solutions:
04.03. Поиск приближенных корней.
The fsolve( ) command
Команда fsolve
Use fsolve( ) to find the approximate solutions of the equation :
Применим команду fsolve для приближенного решения трансцендентного уравнения
.
Just as in the last example we will use a graph to help us determine the number and approximate location of the solutions. Our task is simplified if we start by converting the given equation to an equivalent one that has zero on the right-hand side.
Как и в предыдущем случае, найдём вначале качественное графическое решение. Для этого ещё нужно угадать, как разбросать по обеим частям уравнения его члены. Но графические возможности Maple настолько великолепны, что почти всегда можно собирать все члены уравнения с одной стороны.
So we will solve the equivalent equation :
Рассмотрим уравнение, равносильное данному:
If we now graph the left-hand side of this equation we once again will find solutions at each of the x-intercepts.
Абсциссы точек пересечения графика функции, стоящей в левой части уравнения, с осью Ох и будут искомыми корнями.
> eq:=x^2/20-10*x-15*cos(x+15)=0;
From the graph it appears that there is a solution on the interval [1,2].
График указывает область поисков корней: промежуток [1;2].
We now direct Maple to search for a solution on this interval.
Настаёт черёд команды fsolve :
> fsolve(eq,x=1..2);
Have we found all of the solutions to this equation? In fact there is another solution! To find it start by expanding the interval over which the graph is drawn. Then use fsolve( ) to find a numerical approximation for this second solution.
Корень найден. Но, очевидно, он - не единственный. Расширьте область поисков и ещё раз примените команду fsolve для отыскания второго корня.
С официального разрешения © 2002 Waterloo Maple, Inc