Câu 1 code function cau1de1gt2 clc disp('''' nhap hang so a va b'''' ); a= input(''''nhap a = ''''); b= input(''''nhap b = ''''); [x y] = meshgrid( 10 0 5 10); z = x ^2/a^2+y ^2/b^2; surf(x,y,z); end Câu 2 >> syms x y[.]
Câu code function cau1de1gt2 clc disp(' nhap hang so a va b' ); a= input('nhap a = '); b= input('nhap b = '); [x y] = meshgrid(-10:0.5:10); z = x.^2/a^2+y.^2/b^2; surf(x,y,z); end Câu >> syms x y >> f=log(2*x+3*y); >> subs(diff(diff(f,7,x),3,y),[x,y],[-1,1]) ans = -1.2541e+009 Câu >> syms x y >> f=x^2+y^2-32*log(x*y); >> [x0 y0]=solve(diff(f,x),diff(f,y)) x0 = -4 -4 y0 = 4 -4 -4 >> A= diff(f,2,x); B= diff(diff(f,x),y); C=diff(f,2,y); >> D=A*C-B^2; >> subs(D,[x,y],[4,4]) ans = 16 >> subs(D,[x,y],[-4,-4]) ans = 16 >> subs(A,[x,y],[4,4]) ans = >> subs(A,[x,y],[-4,-4]) ans = % vay ham so co diem cuc tieu la (4,4) va (-4,-4) Câu >> syms x y z >> int(int(int(y,z,0,1-y),y,x^2,1),x,-1,1) ans = 8/35 Câu >> syms n >> symsum(n/3^n,1,inf) ans = 3/4