Mathematica数学实验求根

Mathematica数学实验求根
作出函数f(x)= ex-cosx的图形;求出方程f(x)=0 在[-20,0]的所有根;令 为从0向左依次排列的方程的根,输出 xn-1-xn ,并指出 lim(xn-1-xn),下面还有个N趋于无穷大
天使如梦 1年前 已收到1个回答 举报

flyfly123 幼苗

共回答了16个问题采纳率:93.8% 举报

f[x_] := Exp[x] - Cos[x]
Plot[f[x],{x,-20,20},AxesLabel -> {"x","f(x)"},PlotRange -> All]
Plot[f[x],{x,-20,0}]
{FindRoot[f[x] == 0,{x,-20}],FindRoot[f[x] == 0,{x,-17.5}],
FindRoot[f[x] == 0,{x,-15}],FindRoot[f[x] == 0,{x,-10}],
FindRoot[f[x] == 0,{x,-5}],FindRoot[f[x] == 0,{x,0}]}
Reverse[Drop[%,1]]
{{x -> 0.},{x -> -4.72129},{x -> -10.9956},{x -> -14.1372},{x ->
-17.2788}}
以上符合题意不?

1年前

4
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.028 s. - webmaster@yulucn.com