04.03. Finding Approximate Solutions: 

 04.03. Поиск приближенных корней. 

The fsolve( ) command

Команда fsolve  

Find the other real solutions for the equation x^3+1-exp(x) = 0 .

Получить все действительные корни уравнения x^3+1-exp(x) = 0 и убедиться в этом.

The first step in finding the other solutions is to plot a graph of the left-hand side of the equation.

Key Concept : Recall that the x-intercepts of y = x^3+1-exp(x) correspond exactly to the solutions of the equation x^3+1-exp(x) = 0 .

Шаг первый ( Основная идея ) : найдём графическое решение уравнения. Для этого построим график функции, стоящей в левой части уравнения. Абсциссы точек пересечения этого графика с осью Ох и будут искомыми корнями.

 

 

 

 
 

 

> plot(x^3+1-exp(x),x=-3..5,y=-5..15);

[Maple Plot]

 

The graph shows four x-intercepts. One of these corresponds to the solution we found in Example 2. Which one?

Т.к. мы умело подобрали диапазоны изменений абсцисс и ординат точек графика, то легко обнаружим 4 точки пересечения линии с осью Ох. Одна из них соответствует корню, найденному в Примере 02 ( какая именно? ).

The x=0 solution is also easy to spot. How do we find the other three?

Второй корень очевиден: х = 0. А как поточнее найти остальные?

We can extend the fsolve( ) command to look for a solution in a particular interval. For example to find the negative solution we ask Maple to search on the interval [-1, -.2] since we can see from the graph that there definitely is one (and only one) solution on that interval.

Шаг второй ( Уточнение ) : применим команду fsolve более "зряче". В Maple предусмотрена возможность указания промежутка, на котором отыскиваются корни. В частности, для определения отрицательного корня нашего уравнения, укажем, что поиски следует вести в "районе" [-1;-0.2]. Об этом красноречиво свидетельствует графическое решение.

 

 

 

 
 

 

> fsolve(eq,x=-1..-.2);

-.8251554697

 

To find the other two solutions we use fsolve( ) again, this time with search interval [1,2] and then with interval [4,5].

Оставшиеся корни явно принадлежат промежуткам [1;2] и [4;5] . Расскажем об этом команде fsolve :

 

 

 

 
 

 

> fsolve(eq,x=1..2);
fsolve(eq,x=4..5);

1.545007279

4.567036837

 

What happens if you ask Maple to search for a solution on an interval where no solution exists ?

Ну а что произойдёт, если мы подсунем Maple "пустой участок"? 

Let's try it out. From the graph it is clear that there are no x-intercepts (and therefore no solutions) between 2 and 4.

Например, отрезок [2;4] для нашего уравнения. Там графического решения явно нет:

 
   

> fsolve(eq,x=2..4);

fsolve(x^3+1-exp(x) = 0,x,2 .. 4)

 

Notice that Maple simply returns the original input line unchanged when it cannot find a solution on the given interval.

Maple выдаёт название команды, само уравнение, имя аргумента и отрезок. Т.е. ничего нового. Мол: "Ищите корни сами, а я не нашел".

Are there any other solutions? For example, are there any solutions larger than 5 ? We can check this out by expanding the interval over which the graph is plotted. On the next line we expand the interval to [-3,50]. No other x-intercepts appear. The graph confirms what we should expect by looking at the terms of the expression, namely the exponential term dominates and causes the graph to go down in the long run.

Шаг третий ( Дополнительный анализ ) : Как теперь удостовериться в том, что найдены все корни , а не только в видимой области графического решения? Для этого следует расширить интервал поисков:

 
   

> plot(x^3+1-exp(x),x=-3..50,y=-10..15);

[Maple Plot]

 

Alternatively we can use the fsolve( ) command, now searching over this larger interval.As expected no solutions are found by Maple.In a similar way we can check for solutions to the left . Here we search for solutions over the interval [-50,-1] .

Новых точек пересечения нет. В конце концов мы понимаем, что экспоненциальное слагаемое на границах промежутка вносит самый существенный вклад в величину функции из левой части уравнения. Значения функции в этой области стремятся к -infinity , а потому дополнительных корней нам не найти.

Попробуем в других местах: справа и слева от области найденных корней.

 
   

> fsolve(eq,x=5..50);

fsolve(x^3+1-exp(x) = 0,x,5 .. 50)

> fsolve(eq,x=-50..-1);

fsolve(x^3+1-exp(x) = 0,x,-50 .. -1)

 

None there either !

И здесь ни одного дополнительного корня! Поняв, что с влиянием показательной части уравнения всё ясно, делаем окончательные выводы.

We now have a complete list of the four solutions of our original equation x^3+1-exp(x) = 0 . They are: -.8251554597 , 0 , 1.545007279 and 4.567036837

Исчерпывающее решение уравнения x^3+1-exp(x) = 0 состоит из четырёх корней: -.8251554597 , 0 , 1.545007279 , 4.567036837 .

С официального разрешения                    © 2002 Waterloo Maple, Inc

 

Hosted by uCoz