미적분학 2장 과제-2

184 days ago by k18013023

var('x') f(x)=x^2+x x0=5;y0=f(5) df(x)=diff(f(x), x) # 미분 print df(x) 
       
2*x + 1
2*x + 1
m=df(x0) # 접선의 기울기 p1=plot(f(x), (x, -100, 100)) p2=plot(y0+m*(x-x0), (x, -100, 100), color='red') show(p1+p2) 
       
var('x') f(x)=x^2+x x0=-1;y0=f(-1) df(x)=diff(f(x), x) # 미분 print df(x) 
       
2*x + 1
2*x + 1
m=df(x0) # 접선의 기울기 p1=plot(f(x), (x, -100, 100)) p2=plot(y0+m*(x-x0), (x, -100, 100), color='red') show(p1+p2) 
       
var('x') f(x)=(x-1/x+1) x0=-1;y0=f(-1) df(x)=diff(f(x), x) # 미분 print df(x) 
       
1/x^2 + 1
1/x^2 + 1
p1=plot(f(x), (x, -10, 10)) p2=plot(y0+m*(x-x0), (x, -10, 10), color='red') show(p1+p2) 
       
var('x') f(x)=(x-1/x+1) x0=1;y0=f(1) df(x)=diff(f(x), x) # 미분 print df(x) 
       
1/x^2 + 1
1/x^2 + 1
p1=plot(f(x), (x, -10, 10)) p2=plot(y0+m*(x-x0), (x, -10, 10), color='red') show(p1+p2)