For the function fx y y tan1 xy1 x2 yfind f xySolutionfxy
Solution
fxy is calculated as follows
fxy = 2f / yx = (f / x) / y
syms x
syms y
f = (y(tan^-1(x*y))/(1+(x^2*y^2)));
derx = differentiate(f,x);
dery = differentiate(derx,y);
Following are the rules for differentiation
Rule 1
For any functions f and g and any real numbers a and b are the derivative of the function:
h(x) = af(x) + bg(x) with respect to x is given by
h\'(x) = af\'(x) + bg\'(x)
Rule 2
The sum and subtraction rules state that if f and g are two functions, f\' and g\' are their derivatives respectively, then,
(f + g)\' = f\' + g\'
(f - g)\' = f\' - g\'
Rule 3
The product rule states that if f and g are two functions, f\' and g\' are their derivatives respectively, then,
(f.g)\' = f\'.g + g\'.f
Rule 4
The quotient rule states that if f and g are two functions, f\' and g\' are their derivatives respectively, then,
(f/g)\' = (f\'.g - g\'.f)/g2
Rule 5
The polynomial or elementary power rule states that, if y = f(x) = xn, then f\' = n. x(n-1)
A direct outcome of this rule is that the derivative of any constant is zero, i.e., if y = k, any constant, then
f\' = 0
Rule 6
The chain rule states that, derivative of the function of a function h(x) = f(g(x)) with respect to x is,
h\'(x)= f\'(g(x)).g\'(x)
Example
Create a script file and type the following code into it
syms x
syms t
f = (x + 2)*(x^2 + 3)
der1 = diff(f)
f = (t^2 + 3)*(sqrt(t) + t^3)
der2 = diff(f)
f = (x^2 - 2*x + 1)*(3*x^3 - 5*x^2 + 2)
der3 = diff(f)
f = (2*x^2 + 3*x)/(x^3 + 1)
der4 = diff(f)
f = (x^2 + 1)^17
der5 = diff(f)
f = (t^3 + 3* t^2 + 5*t -9)^(-6)
der6 = diff(f)
When you run the file, MATLAB displays the following result
f =
(x^2 + 3)*(x + 2)
der1 =
2*x*(x + 2) + x^2 + 3
f =
(t^(1/2) + t^3)*(t^2 + 3)
der2 =
(t^2 + 3)*(3*t^2 + 1/(2*t^(1/2))) + 2*t*(t^(1/2) + t^3)
f =
(x^2 - 2*x + 1)*(3*x^3 - 5*x^2 + 2)
der3 =
(2*x - 2)*(3*x^3 - 5*x^2 + 2) - (- 9*x^2 + 10*x)*(x^2 - 2*x + 1)
f =
(2*x^2 + 3*x)/(x^3 + 1)
der4 =
(4*x + 3)/(x^3 + 1) - (3*x^2*(2*x^2 + 3*x))/(x^3 + 1)^2
f =
(x^2 + 1)^17
der5 =
34*x*(x^2 + 1)^16
f =
1/(t^3 + 3*t^2 + 5*t - 9)^6
der6 =
-(6*(3*t^2 + 6*t + 5))/(t^3 + 3*t^2 + 5*t - 9)^7


