syms x
f = cos(x)^2;
diff(f)

ans = -2*sin(x)*cos(x)

Kısmi Türev Hesaplama

x’e göre türev

syms x y
f = sin(x)^2 + cos(y)^2;
diff(f)

ans = 2*cos(x)*sin(x)

y’ye göre türev

syms x y
f = sin(x)^2 + cos(y)^2;
diff(f, y)

ans = -2*cos(y)*sin(y)

İkinci Türev

syms x
f = cos(x)^2;
diff(diff(f))

ans = 2*sin(x)^2-*cos(x)^2

syms x
f = cos(x)^2;
diff(f, x, 2)

ans = 2*sin(x)^2-*cos(x)^2