Uploaded by Arayan Kataria

MATHS MATLAB LIMITS AND DERIVATIVES

advertisement
MATHS MATLAB LIMITS AND DERIVATIVES
L51+l52
Name
: Arayan Kataria
Registration No.
:
20BCE0658
FIRST YEAR COMPUTER SCIENCE BRANCH
LIMITS AND DERIVATIVES
1). Evaluate the following limits with MATLAB
syms x
f(x ) = (1/(x-1) + 1/(x+1))/x
L = limit(f(x) , x , 0)
Output
f(x) = (1/(x - 1) + 1/(x + 1))/x
L = -2
syms x
f(x) = ( sqrt(x^2 + 8) - 3) / (x+1)
L = limit(f(x) , x , -1)
Output
f(x) = ((x^2 + 8)^(1/2) - 3)/(x + 1)
L = -1/3
syms x
f(x) = (x+2)/( sqrt( x^2 + 5) - 3)
L = limit( f(x) , x , -2)
Output
f(x) = (x + 2)/((x^2 + 5)^(1/2) - 3)
L = -3/2
syms x
f(x) = ( 2 - sqrt(x^2 - 5 )) / ( x + 3)
L = limit( f(x) , x , -3)
Output
f(x) = -((x^2 - 5)^(1/2) - 2)/(x + 3)
L = 3/2
syms x
f(x) = ( x - x*cos(x))/(sin(3*x))^2
L = limit( f(x) , x , 0)
Output
f(x) = (x - x*cos(x))/sin(3*x)^2
L=0
syms x
f(x) = ( x + x*cos(x))/(sin(x)*cos(x))
L = limit( f(x) , x , 0)
Output
f(x) = (x + x*cos(x))/(cos(x)*sin(x))
L=2
2). Find the following derivatives using MATLAB commands
syms x
f(x) = (5*x^3 - x^4)^7
df_dx = diff(f(x ) , x )
d2_fx = diff(f(x ) , x , 2)
Output
f(x) = (- x^4 + 5*x^3)^7
df_dx = 7*(- x^4 + 5*x^3)^6*(- 4*x^3 + 15*x^2)
d2_fx = 42*(- x^4 + 5*x^3)^5*(- 4*x^3 + 15*x^2)^2 + 7*(- 12*x^2 +
30*x)*(- x^4 + 5*x^3)^6
syms x
f(x) = 1/(3*x - 2)
df_dx = diff( f(x) , x)
d2_fx = diff(f(x) , x , 2)
Output
f(x) = 1/(3*x - 2)
df_dx = -3/(3*x - 2)^2
d2_fx = 18/(3*x - 2)^3
syms x
f(x) = (sin(x))^5
df_dx = diff(f(x) , x)
d2_fx = diff(f(x) , x , 2)
Output
f(x) = sin(x)^5
df_dx = 5*cos(x)*sin(x)^4
d2_fx = 20*cos(x)^2*sin(x)^3 - 5*sin(x)^5
syms x
f(x) = (1 - (x/7))^-7
df_dx = diff(f(x) , x)
d2_fx = diff(f(x) , x , 2)
Output
f(x) = -1/(x/7 - 1)^7
df_dx = 1/(x/7 - 1)^8
d2_fx = -8/(7*(x/7 - 1)^9)
syms x
f(x) = ((x/2) - 1)^-10
df_dx = diff(f(x) , x)
d2_fx = diff(f(x) , x , 2)
Output
f(x) = 1/(x/2 - 1)^10
df_dx = -5/(x/2 - 1)^11
d2_fx = 55/(2*(x/2 - 1)^12)
syms x
f(x) = ((x^2/8) + x - (1/x))^4
df_dx = diff(f(x) , x)
d2_fx = diff(f(x) , x , 2)
Output
f(x) = (x - 1/x + x^2/8)^4
df_dx = 4*(x/4 + 1/x^2 + 1)*(x - 1/x + x^2/8)^3
d2_fx = 12*(x/4 + 1/x^2 + 1)^2*(x - 1/x + x^2/8)^2 - 4*(2/x^3 - 1/4)*(x - 1/x + x^2/8)^3
syms x
f(x) = sqrt(3*x^2 - 4*x + 6)
df_dx = diff(f(x) , x)
d2_fx = diff(f(x) , x , 2)
Output
f(x) = (3*x^2 - 4*x + 6)^(1/2)
df_dx = (6*x - 4)/(2*(3*x^2 - 4*x + 6)^(1/2))
d2_fx = 3/(3*x^2 - 4*x + 6)^(1/2) - (6*x - 4)^2/(4*(3*x^2 - 4*x + 6)^(3/2))
GRAPHS AND 2-D PLOTS
1).
Answer
2).
Answer
EXPERIMENT 1-A
TANGENTS AND MEAN VALUE THEORUM
1).
Answer
2).
Answer
3).
Answer
4).
Answer
EXPERIMENT 1-B
MAXIMA AND MINIMA OF A FUNCTION OF ONE VARIABLE
1).
Answer
2).
Answer
Download