미분적분학실습2-Week-4

912 days ago by jhlee2chn

var('x, y, z') plot3d(x^2, (x, -2, 2), (y, -2, 2), opacity=0.4) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('x, y, z') implicit_plot3d(y^2 + z^2 == 1, (x, -2, 2), (y, -2, 2), (z, -2, 2), opacity=0.4) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
implicit_plot3d(x^2 + y^2/9 + z^2/4 == 1, (x, -3, 3), (y, -3, 3), (z, -3, 3), opacity=0.4) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('x, y, z') p1 = implicit_plot3d(x^2 + y^2/9 + z^2/4 == 1, (x, -3, 3), (y, -3, 3), (z, -3, 3), opacity=0.4) p2 = implicit_plot3d(x == 0, (x, -3, 3), (y, -3, 3), (z, -3, 3), opacity=0.4, color='red') p1 + p2 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
implicit_plot3d(z == 4*x^2 + y^2, (x, -3, 3), (y, -3, 3), (z, 0, 20), opacity=0.4) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
plot3d(4*x^2 + y^2, (x, -3, 3), (y, -3, 3), opacity=0.4, aspect_ratio=[1,1,1]) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
p1=plot3d(y^2 - x^2, (x, -3, 3), (y, -3, 3), opacity=0.4) p2=plot3d(-1, (x, -3, 3), (y, -3, 3), opacity=0.4, color='red') p1+p2 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('x, y') contour_plot(y^2 - x^2, (x,-pi,pi), (y,-pi,pi), fill=False, cmap='hsv', labels=True) 
       
implicit_plot3d(4*x^2 - y^2 + 2*z^2 + 4, (x, -4, 4), (y, -4, 4), (z, -4, 4), opacity=0.4) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') solve([3 - t > 0, t >= 0], t) 
       
[[0 < t, t < 3], [t == 0]]
[[0 < t, t < 3], [t == 0]]
var('t') r = vector([1 + t^3, t*e^(-t), sin(t) / t]) L = vector([limit(r[i], t = 0) for i in range(0,3)]) print L 
       
(1, 0, 1)
(1, 0, 1)
var('t') r = vector([1 + sin(t), 2 + 5*t^3, -1 + 6*t]) parametric_plot3d(r, (t, 0, 2*pi), color = 'green', thickness = 2) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') r = vector([cos(t), sin(t), t]) p1=parametric_plot3d(r, (t, 0, 4*pi), thickness = 2) p2=implicit_plot3d(x^2+y^2 ==1, (x, -2, 2), (y, -2, 2), (z, 0, 4*pi), color='green', opacity=0.2) p1+p2 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') P = vector([1, 3, -2]) Q = vector([2, -1, 3]) v = Q - P r = P + t*v print r 
       
(t + 1, -4*t + 3, 5*t - 2)
(t + 1, -4*t + 3, 5*t - 2)
parametric_plot3d(r, (t, 0, 1), color='red') + point(P, thickness=3) + point(Q, thickness=3) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') p1=implicit_plot3d(x^2 + y^2 == 1, (x, -3, 3), (y, -3, 3), (z, -3, 4), opacity=0.2) p2=implicit_plot3d(y + z == 2, (x, -3, 3), (y, -3, 3), (z, -3, 4), color='orange',opacity=0.2) p3=parametric_plot3d((cos(t), sin(t), 2-sin(t)), (t, 0, 2*pi), color='red', thickness=3,opacity=0.4) p1+p2+p3 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
parametric_plot3d((sin(3*t)*cos(t), t/4, sin(3*t)*sin(t)),(t, -2*pi, 2*pi)) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') p1=implicit_plot3d(y == x^2, (x, -3, 3), (y, -3, 3), (z, 0, 20), opacity=0.2) p2=implicit_plot3d(z == 4*x^2 + y^2, (x, -3, 3), (y, -3, 3), (z, 0, 20), color='orange',opacity=0.2) p3=parametric_plot3d((t, t^2, 4*t^2 + t^4), (t, -2, 2), color='red', thickness=3,opacity=0.4) p1+p2+p3 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') r = vector([1 + t^3, t*exp(-t), sin(2*t)]) dr = diff(r, t) print dr print dr(t=0) T0 = dr(t=0) / dr(t=0).norm() print T0 
       
(3*t^2, -t*e^(-t) + e^(-t), 2*cos(2*t))
(0, 1, 2)
(0, 1/5*sqrt(5), 2/5*sqrt(5))
(3*t^2, -t*e^(-t) + e^(-t), 2*cos(2*t))
(0, 1, 2)
(0, 1/5*sqrt(5), 2/5*sqrt(5))
var('t') r = vector([sqrt(t), 2 - t]) dr = diff(r, t) print dr r1 = r(t=1) dr1 = dr(t=1) p1 = parametric_plot(r, (t, 0, 2)) a1 = arrow((0,0), r1, color='orange') a2 = arrow(r1, r1 + dr1, color='red') p1 + a1 + a2 
       
(1/2/sqrt(t), -1)
(1/2/sqrt(t), -1)
var('t, s') r = vector([2*cos(t), sin(t), t]) dr = diff(r, t) r1 = r(t=pi/2) dr1 = dr(t=pi/2) q = r1 + s*dr1 p1=parametric_plot3d(r, (t, 0, pi)) p2=parametric_plot3d(q, (s, -1, 1)) print q p1+p2 
       
(-2*s, 1, 1/2*pi + s)
(-2*s, 1, 1/2*pi + s)
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') r = vector([2*cos(t), sin(t), t]) dr = diff(r, t) dr2 = diff(dr, t) print dr print dr2 
       
(-2*sin(t), cos(t), 1)
(-2*cos(t), -sin(t), 0)
(-2*sin(t), cos(t), 1)
(-2*cos(t), -sin(t), 0)
var('t') F = vector([arctan(t), 0, 5]) G = vector([1, log(t), -2*t]) dF = diff(F, t) dG = diff(G, t) print diff(F.cross_product(G), t) print dF.cross_product(G) + F.cross_product(dG) 
       
(-5/t, 2*t/(t^2 + 1) + 2*arctan(t), arctan(t)/t + log(t)/(t^2 + 1))
(-5/t, 2*t/(t^2 + 1) + 2*arctan(t), arctan(t)/t + log(t)/(t^2 + 1))
(-5/t, 2*t/(t^2 + 1) + 2*arctan(t), arctan(t)/t + log(t)/(t^2 + 1))
(-5/t, 2*t/(t^2 + 1) + 2*arctan(t), arctan(t)/t + log(t)/(t^2 + 1))
var('t') r = vector([2*cos(t), sin(t), 2*t]) print integral(r, t) print integral(r, t, 0, pi/2) 
       
(2*sin(t), -cos(t), t^2)
(2, 1, 1/4*pi^2)
(2*sin(t), -cos(t), t^2)
(2, 1, 1/4*pi^2)
var('t') r = vector([arctan(t), 2*exp(2*t), 8*t*exp(t)]) dr = diff(r, t) print dr(t=0) T0 = dr(t=0) / dr(t=0).norm() print T0 
       
(1, 4, 8)
(1/9, 4/9, 8/9)
(1, 4, 8)
(1/9, 4/9, 8/9)
var('t, s') r = vector([t*cos(t), t, t*sin(t)]) dr = diff(r, t) r1 = r(t=pi) dr1 = dr(t=pi) q = r1 + s*dr1 p1=parametric_plot3d(r, (t, pi/2, 3*pi/2)) p2=parametric_plot3d(q, (s, -1, 1), color='red') print q p1+p2 
       
(-pi - s, pi + s, -pi*s)
(-pi - s, pi + s, -pi*s)
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') r = vector([cos(t), sin(t), t]) dr = diff(r, t) integral(dr.norm(), t, 0, 2*pi) 
       
(2*sqrt(2))*pi
(2*sqrt(2))*pi
dr.norm().simplify_full() 
       
sqrt(abs(cos(t))^2 + abs(sin(t))^2 + 1)
sqrt(abs(cos(t))^2 + abs(sin(t))^2 + 1)
var('t, s') r = vector([cos(t), sin(t), t]) dr = diff(r, t) drn = dr.norm().simplify_full() print drn print integral(sqrt(2), t) r(t = s/sqrt(2)) 
       
sqrt(abs(cos(t))^2 + abs(sin(t))^2 + 1)
sqrt(2)*t
(cos(1/2*sqrt(2)*s), sin(1/2*sqrt(2)*s), 1/2*sqrt(2)*s)
sqrt(abs(cos(t))^2 + abs(sin(t))^2 + 1)
sqrt(2)*t
(cos(1/2*sqrt(2)*s), sin(1/2*sqrt(2)*s), 1/2*sqrt(2)*s)
var('t, a') assume(a > 0) r = vector([a*cos(t), a*sin(t)]) dr = diff(r, t) print dr drn = dr.norm().simplify_full() print drn T = dr / a print T dT = diff(T, t) print dT.norm() / a 
       
(-a*sin(t), a*cos(t))
sqrt(a^2*abs(cos(t))^2 + a^2*abs(sin(t))^2)
(-sin(t), cos(t))
sqrt(abs(cos(t))^2 + abs(sin(t))^2)/a
(-a*sin(t), a*cos(t))
sqrt(a^2*abs(cos(t))^2 + a^2*abs(sin(t))^2)
(-sin(t), cos(t))
sqrt(abs(cos(t))^2 + abs(sin(t))^2)/a
var('t') r = vector([t, t^2, t^3]) dr = diff(r, t) print dr dr2 = diff(r, t, 2) print dr2 drn = dr.norm().simplify_full() print drn num = dr.cross_product(dr2).simplify_full() print num curv = (num.norm() / drn^3).simplify_full() print curv print curv(t=0) 
       
(1, 2*t, 3*t^2)
(0, 2, 6*t)
sqrt(9*abs(t)^4 + 4*abs(t)^2 + 1)
(6*t^2, -6*t, 2)
sqrt(36*abs(t)^4 + 36*abs(t)^2 + 4)/(9*abs(t)^4 + 4*abs(t)^2 + 1)^(3/2)
2
(1, 2*t, 3*t^2)
(0, 2, 6*t)
sqrt(9*abs(t)^4 + 4*abs(t)^2 + 1)
(6*t^2, -6*t, 2)
sqrt(36*abs(t)^4 + 36*abs(t)^2 + 4)/(9*abs(t)^4 + 4*abs(t)^2 + 1)^(3/2)
2
f(x) = x^2 df(x) = diff(f(x), x) d2f(x) = diff(df(x), x) curv(x) = abs(d2f(x)) / (1+df(x)^2)^(3/2) print curv(x) 
       
2/(4*x^2 + 1)^(3/2)
2/(4*x^2 + 1)^(3/2)
var('t') r = vector([cos(t), sin(t), t]) dr = diff(r, t) print dr drn = dr.norm().simplify_full() print drn T = dr / sqrt(2) print T dT = diff(T, t) print dT dTn = dT.norm().simplify_full() print dTn N = dT / (1/sqrt(2)) print N B = T.cross_product(N).simplify_full() print B 
       
(-sin(t), cos(t), 1)
sqrt(abs(cos(t))^2 + abs(sin(t))^2 + 1)
(-1/2*sqrt(2)*sin(t), 1/2*sqrt(2)*cos(t), 1/2*sqrt(2))
(-1/2*sqrt(2)*cos(t), -1/2*sqrt(2)*sin(t), 0)
sqrt(1/2*abs(cos(t))^2 + 1/2*abs(sin(t))^2)
(-cos(t), -sin(t), 0)
(1/2*sqrt(2)*sin(t), -1/2*sqrt(2)*cos(t), 1/2*sqrt(2))
(-sin(t), cos(t), 1)
sqrt(abs(cos(t))^2 + abs(sin(t))^2 + 1)
(-1/2*sqrt(2)*sin(t), 1/2*sqrt(2)*cos(t), 1/2*sqrt(2))
(-1/2*sqrt(2)*cos(t), -1/2*sqrt(2)*sin(t), 0)
sqrt(1/2*abs(cos(t))^2 + 1/2*abs(sin(t))^2)
(-cos(t), -sin(t), 0)
(1/2*sqrt(2)*sin(t), -1/2*sqrt(2)*cos(t), 1/2*sqrt(2))
var('t') r = vector([cos(t), sin(t), t]) T = diff(r, t)/norm(diff(r, t)) N = diff(T, t)/norm(diff(T, t)) B = T.cross_product(N) p = parametric_plot(r, (t, 0, 2*pi), color='goldenrod', thickness=2) s = sum([arrow3d(r(t=x), r(t=x) + T(t=x), width=1) + arrow3d(r(t=x), r(t=x) + N(t=x), color='red', width=1) + arrow3d(r(t=x), r(t=x) + B(t=x), color='green', width=1) + point3d ((cos(x), sin(x), x), pointsize=20) for x in [-3..3,step=1]]) p = p + s show(p) 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t, x, y, z') r = vector([cos(t), sin(t), t]) P = vector([0, 1, pi/2]) Q = vector([x, y, z]) T = diff(r, t)/norm(diff(r, t)) N = diff(T, t)/norm(diff(T, t)) B = T.cross_product(N) normal_plane = T(t = pi/2).inner_product(Q - P) == 0 print solve(normal_plane, z) osculating_plane = B(t = pi/2).inner_product(Q - P) == 0 print solve(osculating_plane, z) p = parametric_plot(r, (t, -pi, 2*pi), color='red', thickness=2, opacity = 0.4) u = implicit_plot3d(normal_plane, (x, -5, 5), (y, -5, 5), (z, -2, 6), opacity = 0.4) v = implicit_plot3d(osculating_plane, (x, -5, 5), (y, -5, 5), (z, -2, 6), color='green', opacity = 0.4) w = point3d(P, color='red') p + u + v + w 
       
[
z == 1/2*pi + x
]
[
z == 1/2*pi - x
]
[
z == 1/2*pi + x
]
[
z == 1/2*pi - x
]
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.
var('t') r = vector([sqrt(t), t, t^2]) dr = diff(r, t) numerical_integral(dr.norm(), 1, 4) 
       
(15.38406658043608, 1.7079744929966535e-13)
(15.38406658043608, 1.7079744929966535e-13)
var('t') r = vector([t, t^2, t^3]) dr = diff(r, t) dr2 = diff(r, t, 2) drn = dr.norm().simplify_full() num = dr.cross_product(dr2).simplify_full() curv = (num.norm() / drn^3).simplify_full() print curv(t=1) 
       
1/98*sqrt(19)*sqrt(14)
1/98*sqrt(19)*sqrt(14)