# 미분적분학실습2-Week-13

## 1293 days ago by jhlee2chn

15.1. Vector Fields

Ex. 1

var('x, y') plot_vector_field((-y, x), (x, -2, 2), (y, -2, 2))

Ex. 2

var('x,y,z') plot_vector_field3d((0, 0, z), (x, -3, 3), (y, -3, 3), (z, -3, 3))
 Sleeping...

Ex.

var('x,y,z') plot_vector_field3d((y, -2, x), (x, -3, 3), (y, -3, 3), (z, -3, 3))
 Sleeping...

Ex. 6

var('x, y') f(x, y) = x^2*y - y^3 gradf = f.gradient() p1 = plot_vector_field(gradf, (x, -4, 4), (y, -4, 4)) p2 = contour_plot(f, (x, -4, 4), (y, -4, 4), fill = False, cmap = 'hsv', labels = True) p1 + p2

Exercise 1

var('x, y') f(x, y) = log(1 + x^2 + 2*y^2) gradf = f.gradient() p1 = plot_vector_field(gradf, (x, -4, 4), (y, -4, 4)) p2 = contour_plot(f, (x, -4, 4), (y, -4, 4), fill = False, cmap = 'hsv', labels = True) p1 + p2

15.2. Line Integrals

Ex. 1

var('t') parametric_plot((cos(t), sin(t)),(t, 0, pi))
var('x, y, t') f(x, y) = 2 + x^2*y u = cos(t) v = sin(t) du = diff(u, t) dv = diff(v, t) ds = sqrt((du)^2 + (dv)^2) integral((f(u, v)*ds).simplify_full(), t, 0, pi)
 2*pi + 2/3 2*pi + 2/3

Ex. 2

var('x, y, t') f(x, y) = 2*x u = t v = t^2 du = diff(u, t) dv = diff(v, t) ds = sqrt((du)^2 + (dv)^2) c1 = integral(f(u, v)*ds, t, 0, 1) u = 1 v = t du = diff(u, t) dv = diff(v, t) ds = sqrt((du)^2 + (dv)^2) c2 = integral(f(u, v)*ds, t, 1, 2) c1 + c2
 5/6*sqrt(5) + 11/6 5/6*sqrt(5) + 11/6

Ex. 4

# (a) var('x, y, t') P(x, y) = y^2 Q(x, y) = x A = vector([-5, -3]) B = vector([0, 2]) r = (1 - t)*A + t*B u, v = r du = diff(u, t) dv = diff(v, t) integral(P(u, v)*du + Q(u, v)*dv, t, 0, 1)
 -5/6 -5/6
# (b) u = 4 - t^2 v = t du = diff(u, t) dv = diff(v, t) integral(P(u, v)*du + Q(u, v)*dv, t, -3, 2)
 245/6 245/6

Ex. 5

var('t') parametric_plot3d((cos(t), sin(t), t), (t, 0, 2*pi), color = 'red')
 Sleeping...
var('x, y, t') f(x, y, z) = y*sin(z) u = cos(t) v = sin(t) w = t du = diff(u, t) dv = diff(v, t) dw = diff(w, t) ds = sqrt(du^2 + dv^2 + dw^2) integral((f(u, v, w)*ds).simplify_full(), t, 0, 2*pi)
 sqrt(2)*pi sqrt(2)*pi

Ex. 6

var('x, y, z, t') P(x, y, z) = y Q(x, y, z) = z R(x, y, z) = x A = vector([2, 0, 0]) B = vector([3, 4, 5]) r = (1 - t)*A + t*B u, v, w = r du = diff(u, t) dv = diff(v, t) dw = diff(w, t) c1 = integral(P(u, v, w)*du + Q(u, v, w)*dv + R(u, v, w)*dw, t, 0, 1) print c1
 49/2 49/2
B = vector([3, 4, 5]) C = vector([3, 4, 0]) q = (1 - t)*B + t*C u, v, w = q du = diff(u, t) dv = diff(v, t) dw = diff(w, t) c2 = integral(P(u, v, w)*du + Q(u, v, w)*dv + R(u, v, w)*dw, t, 0, 1) print c2
 -15 -15
c1 + c2
 19/2 19/2

Ex. 7

var('x, y, t') F = vector([x^2, -x*y]) r = vector([cos(t), sin(t)]) p1 = plot_vector_field(F, (x, 0, 1), (y, 0, 1)) p2 = parametric_plot(r, (t, 0, pi/2)) p1 + p2
dr = diff(r, t) integral(F(x = r[0], y = r[1]).inner_product(dr), t, 0, pi/2)
 -2/3 -2/3

Ex. 8

var('x, y, z, t') F = vector([x*y, y*z, z*x]) r = vector([t, t^2, t^3]) p1 = plot_vector_field3d(F, (x, 0, 1), (y, 0, 1), (z, 0, 1)) p2 = parametric_plot3d(r, (t, 0, 1), thickness = 3) p1 + p2
 Sleeping...
dr = diff(r, t) integral(F(x = r[0], y = r[1], z = r[2]).inner_product(dr), t, 0, 1)
 27/28 27/28

Exercise 1

var('t') r = vector([exp(-t)*cos(4*t), exp(-t)*sin(4*t), exp(-t)]) parametric_plot3d(r, (t, 0, 2*pi), color = 'red')
 Sleeping...
# https://sagecell.sagemath.org/ 에서 계산하라. var('x, y, z, t') f(x, y, z) = x^3*y^2*z r = vector([exp(-t)*cos(4*t), exp(-t)*sin(4*t), exp(-t)]) dr = diff(r, t) ds = dr.norm().simplify_full() integral((f(r[0], r[1], r[2])*ds).simplify_full(), t, 0, 2*pi)

Exercise 2

var('x, y, t') F = vector([x/sqrt(x^2 + y^2), y/sqrt(x^2 + y^2)]) r = vector([t, 1 + t^2]) p1 = plot_vector_field(F, (x, -1, 1), (y, 0, 2)) p2 = parametric_plot(r, (t, -1, 1)) p1 + p2
dr = diff(r, t) integral(F(x = r[0], y = r[1]).inner_product(dr), t, -1, 1)
 0 0