matlab实验符号计算答案,实验7 Matlab符号计算.doc
實驗7 Matlab符號計算
實驗目的:
掌握定義符號對象的方法;
掌握符號表達式的運算法則以及符號矩陣運算。
掌握求符號函數極限及導數的方法。
掌握求符號函數定積分和不定積分的方法。
實驗內容:
已知x=6,y=5,利用符號表達式求
分解因式。
(1);
(2)
化簡表達式
(1);
(2)
已知
完成下列運算:
(1).
(2)B的逆矩陣并驗證結果。
(3)包括B矩陣主對角線元素的下三角陣。
用符號方法求下列極限或導數。
。
。
,求和。
用符號方法求下列積分。
(1)
(2)
(3)
詳細實驗內容:
1.已知x=6,y=5,利用符號表達式求
>> syms x y
>> x=6;
>> y=5;
>> z=(x+1)./(sqrt(x+3)-sqrt(y))
z =
9.16311896062463
2.分解因式。
(1);
(2)
(1)>> clear
>> syms x y
>> factor(x.^4-y.^4)
ans =
(x-y)*(x+y)*(x^2+y^2)
(2)>> clear
>> syms x
>> factor(125.*x.^6+75.*x.^4+15.*x.^2+1)
ans =
(5*x^2+1)^3
3.化簡表達式
(1);(2)
(1)>> clear
>> syms bata1 bata2
>> simplify(sin(bata1).*cos(bata2)-cos(bata1).*sin(bata2))
ans =
sin(bata1-bata2)
(2)>> clear
syms x
simplify((4.*x.^2+8.*x+3)./(2.*x+1))
ans =
2*x+3
4.已知
完成下列運算:
(1).
(2)B的逆矩陣并驗證結果。
(3)包括B矩陣主對角線元素的下三角陣。
(1)>> p1=sym([0,1,0;1,0,0;0,0,1]);
p2=sym([1,0,0;0,1,0;1,0,1]);
A=sym('[a,b,c;d,e,f;g,h,i]');
>> B=p1*p2*A
B =
[ d, e, f]
[ a, b, c]
[ a+g, b+h, c+i]
(2)>> simplify(inv(B))
ans =
[ (i*b-c*h)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b), (-e*c-i*e+f*b+f*h)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b), -(-e*c+f*b)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b)]
[ -(i*a-c*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b), -(-d*c-i*d+f*a+f*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b), (-d*c+f*a)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b)]
[ (a*h-b*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b), (-d*b-d*h+e*a+e*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b), -(-d*b+e*a)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b)]
>> simplify(B*inv(B))
ans =
[ 1, 0, 0]
[ 0, 1, 0]
[ 0, 0, 1]
(3)>> B([4,7,8])=[0,0,0]
B =
[ d, 0, 0]
[ a, b, 0]
[ a+g, b+h, c+i]
5.用符號方法求下列極限或導數。
。
。
,求和。
(1)>> clear
>> syms x;
fun=(x.*(exp(sin(x))+1)-2.*(exp(tan(x))-1))./(sin(x)).^3;
limit(fun,x,0)
ans =
-1/2
(2)>> clear
syms x;
fun=(sqrt(x)-sqrt(acos(x)))./sqrt(x+1);
limit(fun,x,1)
ans =
1/2*2^(1/2)
(3)>> clear
syms x;
y=(1-cos(2.*x))./x;
>> dx1=diff(y)
dx1 =
2*sin(2*x)/x-(1-cos(2*x))/x^2
>> diff(y,2)
ans =
4*co
總結
以上是生活随笔為你收集整理的matlab实验符号计算答案,实验7 Matlab符号计算.doc的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: oracle中的in函数,Oracle中
- 下一篇: t分布f分布与样本均值抽样分布_分布模拟