小角度近似成立边界(误差小于1%)
c
o
s
θ
≈
1
cos\theta \approx 1
cosθ≈1 ,
θ
<
=
8.07
°
\theta <= 8.07 °
θ<=8.07°时成立
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ocIrArLE-1691896890813)(https://note.youdao.com/yws/res/62410/WEBRESOURCE52ce5dcf92c7e0e2799926284d0ebe4d)]](https://img-blog.csdnimg.cn/42a4c245513c4951bd062e53d34088bc.png)
clc;clear;close all
x = 0:0.01:15;
y_real = cosd(x);
y_hat = ones(1,size(x,2));
err = (y_hat - y_real)./y_real.*100;
index = find(err > 0.997 & err< 1.002);
figure;plot(x,err);hold on;plot(x(index),err(index),'ro');
hold on; plot(x,y_hat);title('1 - cos x');
ylabel('Relat error, %');xlabel('Angle,°');
figure;plot(x,y_real,'b-');hold on;
plot(x,y_hat,'r-');legend('y = cos x','y = 1','Location','best')
xlabel('Angle,°');ylabel('y');title('y = cosx')
t
a
n
θ
≈
θ
tan \theta \approx \theta
tanθ≈θ,
θ
<
=
9.91
°
\theta <= 9.91 °
θ<=9.91°时成立
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-yEgUuKDc-1691896890814)(https://note.youdao.com/yws/res/62420/WEBRESOURCE4a96f1016f2d116a870ead8399cabf48)]](https://img-blog.csdnimg.cn/84091a0067ec4e9ab1277f3269dde9f7.png)
clc;clear;close all
x = 0:0.01:45;
y_real = tand(x);
y_hat = deg2rad(x);
figure;plot(x,y_real,'b-');hold on;
plot(x,y_hat,'r-');legend('y = tan x','y = x(rad)','Location','best')
xlabel('Angle,°');ylabel('y');title('y = tanx')
err = (y_real - y_hat)./y_real.*100;
index = find(err > 0.998 & err< 1.002);
figure;plot(x,err);hold on;plot(x(index),err(index),'ro');
hold on; plot(x,ones(1,size(x,2)));title('tan x - x');
ylabel('Relat error, %');xlabel('Angle,°');
s
i
n
θ
≈
θ
sin \theta \approx \theta
sinθ≈θ,
θ
<
=
13.99
°
\theta <= 13.99 °
θ<=13.99°时成立
![在这里插入图片描述](https://img-blog.csdnimg.cn/d62fc2f26faa4ad8b3e4d9bd5fb287db.png)
clc;clear;close all
x = 0:0.01:90;
y_real = sind(x);
y_hat = deg2rad(x);
figure;plot(x,y_real,'b-');hold on;
plot(x,y_hat,'r-');legend('y = tan x','y = x(rad)','Location','best')
xlabel('Angle,°');ylabel('y');title('y = sinx')
err = (y_hat - y_real)./y_real.*100;
index = find(err > 0.998 & err< 1.002);
figure;plot(x,err);hold on;plot(x(index),err(index),'ro');
hold on; plot(x,ones(1,size(x,2)));title('x - sinx');
ylabel('Relat error, %');xlabel('Angle,°');
c
o
s
θ
≈
1
−
θ
2
/
2
cos \theta \approx 1 - \theta^2/2
cosθ≈1−θ2/2,`
θ
<
=
37.93
°
\theta <= 37.93 °
θ<=37.93°时成立
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-LFIwoQaJ-1691896890815)(https://note.youdao.com/yws/res/62433/WEBRESOURCE485bdefcaa25b97524f273620789e96d)]](https://img-blog.csdnimg.cn/ef02a41471f84d77861a380b812748fb.png)
clc;clear;close all
x = 0:0.01:90;
y_real = cosd(x);
y_hat = 1 - deg2rad(x).^2./2;
figure;plot(x,y_real,'b-');hold on;
plot(x,y_hat,'r-');
legend('y = cos x','y = 1-x^2/2(rad)','Location','best')
xlabel('Angle,°');ylabel('y');title('y = cosx')
err = abs((y_hat - y_real)./y_real.*100);
index = find(err > 0.999 & err< 1.002);
figure;plot(x,err);hold on;plot(x(index),err(index),'ro');
hold on; plot(x,ones(1,size(x,2)));title('cosx(°) - (1-x^2/2(rad))');
ylabel('Relat error, %');xlabel('Angle,°');
ylim([0,3])