Шоста лабораторна робота
>> syms a b c d e f g h z
>> A=[a b c; d e f; g h z];
>> B=[z g e; c a h; f d b];
>> A*B
ans =
[ b*c + c*f + a*z, a*b + c*d + a*g, b*c + a*e + b*h]
[ f^2 + c*e + d*z, a*e + d*f + d*g, b*f + d*e + e*h]
[ c*h + f*z + g*z, g^2 + a*h + d*z, h^2 + e*g + b*z]
>> D=[12 14 13; 0.9*13 2.4 3.5; 1 2 3]
D =
12.0000 14.0000 13.0000
11.7000 2.4000 3.5000
1.0000 2.0000 3.0000
>> A=sym(D)
A =
[ 12, 14, 13]
[ 117/10, 12/5, 7/2]
[ 1, 2, 3]
>> a1=sym(1.0e10);
a2=sym(1.0e-10);
>>
>> a3=sym(1.0e13);
>> a4=sym(1.0e-13);
>> s=a1+a2+a3+a4
s =
100100000000000000000001001/10000000000000
>> a=sym('sqrt(13.13)');
>> a=vpa(a,42)
a =
3.62353418639868775283041417892435396094022
>> f=sym('((x-11)^2+(y-11)^3)')
f =
(x - 11)^2 + (y - 11)^3
>> ezplot(f,[- 11 11 -11 11])
d
>> y=sym('((x+13)^5-(x+2*13)^4+(x+13)^2+x-13)');
>> pretty(y)
2 5 4
x + (x + 13) + (x + 13) - (x + 26) - 13
>> z=collect(y)
z =
x^5 + 64*x^4 + 1586*x^3 + 17915*x^2 + 72528*x - 85527
>> z=collect(y, '13')
z =
371293 + (5*x)*28561 + (10*x^2)*2197 + 169*(10*x^3 + 1) + 13*(5*x^4 + 2*x) + x - (x + 26)^4 + x^2 + x^5 - 13
>> q=expand(y)
q =
x^5 + 64*x^4 + 1586*x^3 + 17915*x^2 + 72528*x - 85527
>> horner(y)
ans =
x*(x*(x*(x*(x + 64) + 1586) + 17915) + 72528) - 85527
>> f=sym('((x-13)^2+(y-13)^3)')
f =
(x - 13)^2 + (y - 13)^3
>> ezplot(f,[-13 13 -13 13])
>> factor(1000*13+2*12)
ans =
2 2 2 2 2 11 37
>> y=sym('(sin(a)*sin(b-c)*cos(b+c-a)+sin(b)*sin(c-a)*cos(c+a-b)+sin(c)*sin(a-b)*cos(a+b-c))');
>> y1=simple(y)
y1 =
0
>> y2=simplify(y)
y2 =
0
>> y=sym('(13*sin(x)+cos(x))');
>> ty=taylor(y, 13)
ty =
x^12/479001600 - (13*x^11)/39916800 - x^10/3628800 + (13*x^9)/362880 + x^8/40320 - (13*x^7)/5040 - x^6/720 + (13*x^5)/120 + x^4/24 - (13*x^3)/6 - x^2/2 + 13*x + 1
>> syms k x
>> s=symsum(13*(-1)^(k)*x^(2*k)/sym('(2*k)!'),k,0,inf)
s =
13*cos(x)
>> syms x
>> limit((13*sin(x)/x),x,0)
ans =
13
>> limit((atan(1/x)),x,0, 'left')
ans =
-pi/2
>> limit((atan(1/x)),x,0, 'right')
ans =
pi/2
>> y=diff('(13*(sin(x))^2+13^2*x^3+exp(13*x))',x,1)
y =
13*exp(13*x) + 26*cos(x)*sin(x) + 507*x^2
>> y=diff('(13*(sin(x))^2+13^2*x^3+exp(13*x))',x,2)
y =
26*cos(x)^2 - 26*sin(x)^2 + 1014*x + 169*exp(13*x)
>> y=diff('(13*(sin(x))^2+13^2*x^3+exp(13*x))',x,3)
y =
2197*exp(13*x) - 104*cos(x)*sin(x) + 1014
>> syms a b x y p q
>> f=sym('(x^2/2*p+y^2/2*q)');
>> Ix=int(f,x,0,a)
Ix =
(p*a^3)/6 + (q*a*y^2)/2
>> Iy=int(Ix,y,0,b)
Iy =
(p*a^3*b)/6 + (q*a*b^3)/6
>> pretty(Iy)
3 3
p a b q a b
------ + ------
6 6
