>> % uloha 41 >> syms n >> limit((n^2+5*n+1)/(n^3-3),inf) ans = 0 >> limit(sqrt(n^3+2*n-1)/(n+2),inf) ans = Inf >> limit(symsum(n^2,n,1,n)/(2*n^3+n^2-1),inf) ans = 1/6 >> % uloha 42 >> clear; syms x a b >> limit((sin(x)/sin(a))^(1/(x-a)),x,a) ans = exp(cos(a)/sin(a)) >> limit((exp(a*x)-exp(b*x))/x,x,0) ans = a-b >> limit(atan(1/(1-x)),x,1,'right') ans = -1/2*pi >> limit((sin(2*x)-2*sin(x))/(2*exp(x)-x^2-2*x-2),x,0) ans = -3 >> clear; syms x >> F1 = int(1/(1+x^2)) F1 = atan(x) >> latex(F1) ans = \arctan \left( x \right) >> diff(F1) ans = 1/(1+x^2) >> F2 = int(1/x+1/x^3+5*x^4) F2 = log(x)-1/2/x^2+x^5 >> pretty(F2) 1 5 log(x) - 1/2 ---- + x 2 x >> diff(F2) ans = 1/x+1/x^3+5*x^4 >> F3 = int(x^2*log(x)) F3 = 1/3*x^3*log(x)-1/9*x^3 >> pretty(F3) 3 3 1/3 x log(x) - 1/9 x >> diff(F3) ans = x^2*log(x) >> % uloha 44 >> d1 = diff(cos(3*x^2+2*x+1)^3) d1 = -3*cos(3*x^2+2*x+1)^2*sin(3*x^2+2*x+1)*(6*x+2) >> d2 = diff(cos(3*x^2+2*x+1)^3, 2) % nebo d2 = diff(d1) d2 = 6*cos(3*x^2+2*x+1)*sin(3*x^2+2*x+1)^2*(6*x+2)^2-3*cos(3*x^2+2*x+1)^3*(6*x+2)^2-18*cos(3*x^2+2*x+1)^2*sin(3*x^2+2*x+1) >> pretty(d2) 2 2 2 2 6 cos(3 x + 2 x + 1) sin(3 x + 2 x + 1) (6 x + 2) 2 3 2 - 3 cos(3 x + 2 x + 1) (6 x + 2) 2 2 2 - 18 cos(3 x + 2 x + 1) sin(3 x + 2 x + 1) >> d2 = simple(d2); pretty(d2) 2 2 2 2 6 cos(3 x + 2 x + 1) sin(3 x + 2 x + 1) (6 x + 2) 2 3 2 - 3 cos(3 x + 2 x + 1) (6 x + 2) 2 2 2 - 18 cos(3 x + 2 x + 1) sin(3 x + 2 x + 1) >> d3 = diff(cos(3*x^2+2*x+1)^3, 3) % nebo d3 = diff(d2) d3 = -6*sin(3*x^2+2*x+1)^3*(6*x+2)^3+21*cos(3*x^2+2*x+1)^2*sin(3*x^2+2*x+1)*(6*x+2)^3+108*cos(3*x^2+2*x+1)*sin(3*x^2+2*x+1)^2*(6*x+2)-54*cos(3*x^2+2*x+1)^3*(6*x+2) >> pretty(d3) 2 3 3 -6 sin(3 x + 2 x + 1) (6 x + 2) 2 2 2 3 + 21 cos(3 x + 2 x + 1) sin(3 x + 2 x + 1) (6 x + 2) 2 2 2 + 108 cos(3 x + 2 x + 1) sin(3 x + 2 x + 1) (6 x + 2) 2 3 - 54 cos(3 x + 2 x + 1) (6 x + 2) >> latex(d3) ans = -6\, \left( \sin \left( 3\,{x}^{2}+2\,x+1 \right) \right) ^{3} \left( 6\,x+2 \right) ^{3}+21\, \left( \cos \left( 3\,{x}^{2}+2\,x+1 \right) \right) ^{2}\sin \left( 3\,{x}^{2}+2\,x+1 \right) \left( 6\,x+2 \right) ^{3}+108\,\cos \left( 3\,{x}^{2}+2\,x+1 \right) \left( \sin \left( 3\,{x}^{2}+2\,x+1 \right) \right) ^{2} \left( 6\,x+2 \right) -54\, \left( \cos \left( 3\,{x}^{2}+2\,x+1 \right) \right) ^{3} \left( 6\,x+2 \right) >> fce2 = (3*x+cos(x))^(1/3) fce2 = (3*x+cos(x))^(1/3) >> pretty(fce2) 1/3 (3 x + cos(x)) >> d1 = diff(fce2) d1 = 1/3/(3*x+cos(x))^(2/3)*(3-sin(x)) >> pretty(d1) 3 - sin(x) 1/3 ----------------- 2/3 (3 x + cos(x)) >> d2 = diff(fce2, 2); pretty(d2) 2 (3 - sin(x)) cos(x) - 2/9 ----------------- - 1/3 ----------------- 5/3 2/3 (3 x + cos(x)) (3 x + cos(x)) >> d3 = diff(fce2, 3); pretty(d3) 3 10 (3 - sin(x)) (3 - sin(x)) cos(x) sin(x) -- ----------------- + 2/3 ------------------- + 1/3 ----------------- 27 8/3 5/3 2/3 (3 x + cos(x)) (3 x + cos(x)) (3 x + cos(x)) >> fce3 = (x^3-2*x+5)^5 fce3 = (x^3-2*x+5)^5 >> d1 = diff(fce3), pretty(d1) d1 = 5*(x^3-2*x+5)^4*(3*x^2-2) 3 4 2 5 (x - 2 x + 5) (3 x - 2) >> d2 = diff(fce3, 2); pretty(d2) 3 3 2 2 3 4 20 (x - 2 x + 5) (3 x - 2) + 30 (x - 2 x + 5) x >> d3 = diff(fce3, 3); pretty(d3) 3 2 2 3 3 3 2 60 (x - 2 x + 5) (3 x - 2) + 360 (x - 2 x + 5) (3 x - 2) x 3 4 + 30 (x - 2 x + 5) >> % uloha 45 >> clear; syms x n >> symsum((-1)^(n+1)*(x-1)^n/n,n,1,inf) ans = log(x) >> % uloha 46 >> f = dsolve('D2y+2*Dy+2*y=0') f = C1*exp(-t)*sin(t)+C2*exp(-t)*cos(t) >> syms x >> y = exp(-x)*sin(x) y = exp(-x)*sin(x) >> diff(y,2)+2*diff(y)+2*y ans = 0 >> % uloha 47 >> clear >> f = dsolve('D2y+6*Dy+8*y-(2*x^2-2*x)*exp(-x)=0','y(0)=3','Dy(0)=-6','x') f = (2/3*exp(x)*x^2-22/9*exp(x)*x+76/27*exp(x)+5/27*exp(-2*x))*exp(-2*x) >> f = simple(f); >> f f = 2/3/exp(x)*x^2-22/9/exp(x)*x+76/27/exp(x)+5/27/exp(x)^4 >> pretty(f) 2 x x 76 1 1 2/3 ------ - 22/9 ------ + -- ------ + 5/27 ------- exp(x) exp(x) 27 exp(x) 4 exp(x) >> syms x >> subs(f,x,0) ans = 3 >> subs(diff(f),x,0) ans = -6 >> % uloha 48 >> clear; syms x >> r = taylor(log(1+x),7) r = x-1/2*x^2+1/3*x^3-1/4*x^4+1/5*x^5-1/6*x^6 >> ezplot(log(1+x),[-0.5 1.5]),hold on,h=ezplot(r,[-0.5 1.5]);set(h,'color',[1,0,0]);hold off >> r2 = taylor(log(1+x),3) r2 = x-1/2*x^2 >> ezplot(log(1+x),[-0.5 1.5]),hold on,h=ezplot(r2,[-0.5 1.5]);set(h,'color',[1,0,0]);hold off >> % uloha 49 - lepsi by byl skript >> clear >> syms x >> f = sin(2*x)/(x^2-x-2) f = sin(2*x)/(x^2-x-2) >> pretty(f) sin(2 x) ---------- 2 x - x - 2 >> solve(x^2-x-2) % body nespojitosti ans = 2 -1 >> limit(f,x,-1,'left') ans = -Inf >> limit(f,x,-1,'right') ans = Inf >> limit(f,x,2,'left') ans = Inf >> limit(f,x,2,'right') ans = -Inf >> ezplot(f,[-4*pi,4*pi]) >> solve(f) ans = 0 >> I = int(f,0,1) I = -1/3*sinint(2)*cos(4)+1/3*sin(4)*cosint(2)-1/3*sinint(4)*cos(2)+1/3*cosint(4)*sin(2)+1/3*sinint(4)*cos(4)-1/3*sin(4)*cosint(4)+1/3*sinint(2)*cos(2)-1/3*cosint(2)*sin(2) >> double(I) ans = -0.3253 >> df = diff(f) df = 2*cos(2*x)/(x^2-x-2)-sin(2*x)/(x^2-x-2)^2*(2*x-1) >> subs(df,0) ans = -1 >> % uloha 50 >> clear, syms a >> A = [3 0 a 1; 0 a 1 1; a 1 1 2; 1 1 2 0] A = [ 3, 0, a, 1] [ 0, a, 1, 1] [ a, 1, 1, 2] [ 1, 1, 2, 0] >> D = det(A) D = -15*a+10+5*a^2 >> solve(D) % kdy je singularni ans = 2 1 >> Ainv = inv(A) Ainv = [ -1/5*(4*a-3)/(-3*a+2+a^2), -1/5*(2*a+1)/(-3*a+2+a^2), 1/5*(3*a-1)/(-3*a+2+a^2), 1/5*(2*a^2-2*a+1)/(-3*a+2+a^2)] [ -1/5*(2*a+1)/(-3*a+2+a^2), 1/5*(4*a-13)/(-3*a+2+a^2), -1/5*(a-7)/(-3*a+2+a^2), 1/5*(a^2-a+3)/(-3*a+2+a^2)] [ 1/5*(3*a-1)/(-3*a+2+a^2), -1/5*(a-7)/(-3*a+2+a^2), -1/5*(a+3)/(-3*a+2+a^2), 1/5*(a^2-6*a+3)/(-3*a+2+a^2)] [ 1/5*(2*a^2-2*a+1)/(-3*a+2+a^2), 1/5*(a^2-a+3)/(-3*a+2+a^2), 1/5*(a^2-6*a+3)/(-3*a+2+a^2), -1/5*(a^3-3*a+3)/(-3*a+2+a^2)] >> p = poly(A) p = x^4-4*x^3-4*x^2-a*x^3+4*a*x^2-2*a*x+16*x-15*a+10-a^2*x^2+a^3*x+5*a^2 >> collect(p) ans = x^4+(-4-a)*x^3+(4*a-a^2-4)*x^2+(-2*a+16+a^3)*x-15*a+10+5*a^2 >> ezplot(subs(p,a,0),[-3,5]) >> eig(subs(A,a,0)) % nebo B=subs(A,0); eig(B) ans = -1.7294 -0.5970 2.5970 3.7294