︠4aa36d05-fce6-40fe-9180-a8384d2c6b20i︠ %html

Calculate the line integral of $\int_{C^+} \,(-ydx+xdy) \,$ for each of the curves $C^+$ from (0,0) to (1,1)

1. Problem 1: $C: y=x^2$    YouTube Video

2. Problem 2: $C: y=\sqrt{x}$

3. Problem 3: $C: y=\sin ({{\pi x} \over 2})$

Cool graphs with explanations are at the bottom of each problem!

Other Sage pages for Line Integral of Work Type:    SOLVER  


Formula Sheet  $\int_{C^+} P(x,y,z)\, dx+Q(x,y,z) \,dy+R(x,y,z) \,dz = \int_C \vec F \cdot d \vec s = \int_{t_1}^{t_2}\, \lt P(t), Q(t), R(t) \gt \cdot \lt \dot{x}, \dot{y},\dot{z} \gt \, dt$

where C is the curve parameterized by $\vec s(t)= \lt x(t),\, y(t),\, z(t) \gt$ with given orientation $t \in [t1,t2]$ and $\vec F= \lt P,Q,R \gt$.



SOLUTION TO PROBLEMS 

Check type of line integral: This line integral is of work type (Type II) since the integrand is a vector function (it has components: P=-y and Q=x) - watch the video.

Preparation for SOLVER: We must parameterize the curve C with a vector function $\vec s(t)$ in 1 parameter t, find the interval and check that the order of this interval puts the orientation of the curve as given.

Work particular to the given problems: All curves are 2d and given explicitly with interval: $x \in [0,1 ]$. We simply let x=t, y=f(t) and z=0 with interval: $t\in [0,1 ]$




Problem 1: Calculate the line integral of work type $\int_C \,(-ydx+xdy) $ where $C: y=x^2$ from (0,0) to (1,1).

Step 0: The program declares our variables. We are given variables (x,y,z). We need t as parameter.

︡bba83a67-9795-45b5-aa68-b20b4f1f42c4︡{"html": "

Calculate the line integral of $\\int_{C^+} \\,(-ydx+xdy) \\,$ for each of the curves $C^+$ from (0,0) to (1,1)

\n
\n

1. Problem 1: $C: y=x^2$    YouTube Video

\n

2. Problem 2: $C: y=\\sqrt{x}$

\n

3. Problem 3: $C: y=\\sin ({{\\pi x} \\over 2})$

\n
\n

Cool graphs with explanations are at the bottom of each problem!

\n

Other Sage pages for Line Integral of Work Type:    SOLVER  

\n
\n

Formula Sheet  $\\int_{C^+} P(x,y,z)\\, dx+Q(x,y,z) \\,dy+R(x,y,z) \\,dz = \\int_C \\vec F \\cdot d \\vec s = \\int_{t_1}^{t_2}\\, \\lt P(t), Q(t), R(t) \\gt \\cdot \\lt \\dot{x}, \\dot{y},\\dot{z} \\gt \\, dt$

\n
\n

where C is the curve parameterized by $\\vec s(t)= \\lt x(t),\\, y(t),\\, z(t) \\gt$ with given orientation $t \\in [t1,t2]$ and $\\vec F= \\lt P,Q,R \\gt$.

\n
\n

\n

SOLUTION TO PROBLEMS 

\n

Check type of line integral: This line integral is of work type (Type II) since the integrand is a vector function (it has components: P=-y and Q=x) - watch the video.

\n

Preparation for SOLVER: We must parameterize the curve C with a vector function $\\vec s(t)$ in 1 parameter t, find the interval and check that the order of this interval puts the orientation of the curve as given.

\n
\n

Work particular to the given problems: All curves are 2d and given explicitly with interval: $x \\in [0,1 ]$. We simply let x=t, y=f(t) and z=0 with interval: $t\\in [0,1 ]$

\n
\n


\n

Problem 1: Calculate the line integral of work type $\\int_C \\,(-ydx+xdy) $ where $C: y=x^2$ from (0,0) to (1,1).

\n

Step 0: The program declares our variables. We are given variables (x,y,z). We need t as parameter.

"}︡ ︠a052acd7-4fdd-46fc-90ff-1a232da7b753︠ var ('t'); var('x y z') ︡129e2ccb-a2e4-415f-babe-612671ad797d︡{"stdout": "t\n(x, y, z)"}︡ ︠cca50f66-695e-4a83-9a6b-79347f2fa573i︠ %html

Step 1: We define $C(t)=\vec s(t)$, the interval of t and $\vec F$. Changes with problem; you must input your parametrization of the curve, your interval for t (check orientation) and your vector function F(x,y,z).

︡35129994-c3de-4cbb-bf05-436211621d4b︡{"html": "
\n

Step 1: We define $C(t)=\\vec s(t)$, the interval of t and $\\vec F$. Changes with problem; you must input your parametrization of the curve, your interval for t (check orientation) and your vector function F(x,y,z).

"}︡ ︠462f5e7b-ca3b-4451-bdc9-b0e1c48f5633︠ s=vector((t,t^2,0)) t1=0; t2=1 F=vector((-y,x,0)) ︡0b56db24-8edd-42dc-91e5-1aa3f72ab4ec︡︡ ︠efc9cd45-5c86-4bec-b74c-559f88743b04i︠ %html

Step 2: The program finds the vector function with the partial derivatives: $d \vec s(t)=\lt {\dot{x}},\, {\dot{y}},\, {\dot{z}} \gt$

︡d6d13d36-a773-43fb-8e21-45518a29996d︡{"html": "
\n

Step 2: The program finds the vector function with the partial derivatives: $d \\vec s(t)=\\lt {\\dot{x}},\\, {\\dot{y}},\\, {\\dot{z}} \\gt$

"}︡ ︠e94961a1-8def-4e16-a17f-c2cb0e2ba772︠ ds=diff(s,t) view(ds) ︡6094e07a-99d1-48e7-ad81-21882d12921f︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(1,\\,2 \\, t,\\,0\\right)"}︡ ︠b206efd6-673b-4b46-bb2e-827f02625b61i︠ %html

Step 3: The program defines a standard sage function for "change of variables" for a 1-variable parametrization (curve).

The program changes the variables of $\vec F$ from a vector in x, y, z to a vector of t using the components of s(t).

︡c3cba7a7-ea2c-40c3-a1dd-eeaf45c76ddc︡{"html": "
\n

Step 3: The program defines a standard sage function for \"change of variables\" for a 1-variable parametrization (curve).

\n

The program changes the variables of $\\vec F$ from a vector in x, y, z to a vector of t using the components of s(t).

"}︡ ︠fc6634c3-998d-47df-ad1c-5264420d3d19︠ def changevar(f, eqn, newvar1): return f.substitute(eqn) ︡14db6185-57d5-400b-b211-2c830bdc0ba9︡︡ ︠9f6c0781-c6c9-4800-986b-89789261707a︠ F=changevar(F,x==s[0],t) F=changevar(F,y==s[1],t) F=changevar(F,z==s[2],t) view(F) ︡01821975-a7f7-411f-a655-5cdac9cb5563︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(-t^{2},\\,t,\\,0\\right)"}︡ ︠62cc7552-7a69-4c8b-b66f-a7f5cdd52732i︠ %html

Step 4: Then program finds the dot product of the vectors from Step2 and Step3.

︡fa72e9e6-3a54-4dc1-a750-85e373e693ec︡{"html": "
\r\n

Step 4: Then program finds the dot product of the vectors from Step2 and Step3.

"}︡ ︠27ac0e3e-7dc8-4bfa-b2bc-dd2528122692︠ integrand=F.dot_product(ds) view(integrand) ︡d7b4506a-d9c8-4ff7-8ea9-959627584ffa︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}t^{2}"}︡ ︠69c5400a-62a4-4fc6-a98a-4f256c558661i︠ %html

Step 6: The program computes the integral (work).

︡e8caeefa-8168-42bf-b18c-23dc9a0c1d32︡{"html": "
\n

Step 6: The program computes the integral (work).

"}︡ ︠c9d4d240-4b6c-450e-9856-5bc42a9f4a59︠ result=integral(integrand,(t,t1,t2)) view(result) ︡e03f58e8-e8de-40f1-b76d-e3a3138cf7ab︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{1}{3}"}︡ ︠3790f11c-68e3-4afc-b8ea-656f1608060c︠ n(result) ︡66c21418-123c-4fd6-9491-96bb0bff4da4︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}0.333333333333333"}︡ ︠56728856-9c94-4a49-9b42-5a94e98971a3i︠ %html

So the work done by $\vec F = \lt -y, \, x \gt $ along the line curve $y=x^2$ from (0,0) to (1,1) is: $\int_C \,(-ydx+xdy) =1/3 \approx 0.33$  



Graph 1: We graph the vector field $\vec F$ and the curve $y=x^2$  from (0,0) to (1,1).

︡7252d2f7-9088-44c3-bedb-924906265cdd︡{"html": "

\n

So the work done by $\\vec F = \\lt -y, \\, x \\gt $ along the line curve $y=x^2$ from (0,0) to (1,1) is: $\\int_C \\,(-ydx+xdy) =1/3 \\approx 0.33$  

\n

\n

Graph 1: We graph the vector field $\\vec F$ and the curve $y=x^2$  from (0,0) to (1,1).

\n"}︡ ︠42e96f94-eec4-4a94-8da4-bb92fd323a9d︠ xmin=-2; xmax=2; ymin=-2; ymax=2; zmin=-1; zmax=1 VF=plot_vector_field(vector((-y,x)), (x,xmin,xmax),(y,ymin,ymax), color='red') C=parametric_plot(vector((t,t^2)),(t,0,1)) show(VF+C) ︡7f6e7a71-10b5-443a-8757-06a466cf6999︡{"html": ""}︡ ︠9e34c263-4634-4c33-8b79-9366fd8e0495i︠ %html


Problem 2: Calculate the line integral of work type $\int_C \,(-ydx+xdy) =0\,$ where $C: y=\sqrt{x}$


Step 0: The program declares our variables. We are given variables (x,y,z). We need t as parameter.

︡665fa4bc-cec5-49a7-82c1-fb08f3b82f8c︡{"html": "


\n

Problem 2: Calculate the line integral of work type $\\int_C \\,(-ydx+xdy) =0\\,$ where $C: y=\\sqrt{x}$

\n
\n

Step 0: The program declares our variables. We are given variables (x,y,z). We need t as parameter.

"}︡ ︠3e922d2f-e4eb-471e-9a75-a156ce365c41︠ var ('t'); var('x y z') ︡1f618959-88ce-46bb-bfa9-f2685026755f︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}t"}︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(x, y, z\\right)"}︡ ︠7439e287-3c0e-4449-bfd9-ecf40e118fd7i︠ %html

Step 1: We define $C(t)=\vec s(t)$, the interval of t and $\vec F$. Changes with problem; you must input your parametrization of the curve, your interval for t (check orientation) and your vector function F(x,y,z).

︡f434cfdc-121e-4715-beb4-4f40c0d19852︡{"html": "
\n

Step 1: We define $C(t)=\\vec s(t)$, the interval of t and $\\vec F$. Changes with problem; you must input your parametrization of the curve, your interval for t (check orientation) and your vector function F(x,y,z).

"}︡ ︠8b4ddb55-8d90-4cc0-a536-e0f4a7205fed︠ s2=vector((t,sqrt(t),0)) t1=0; t2=1 F2=vector((-y,x,0)) ︡ca2d74d4-e616-42d5-8cf1-0cadccf6a466︡︡ ︠a98e1d85-c013-4354-8e26-df43679ce241i︠ %html

Step 2: The program finds the vector function with the partial derivatives: $d \vec s(t)=\lt {\dot{x}},\, {\dot{y}},\, {\dot{z}} \gt$

︡cdca81a6-8ced-4a57-b2af-76caea3f3f4c︡{"html": "
\n

Step 2: The program finds the vector function with the partial derivatives: $d \\vec s(t)=\\lt {\\dot{x}},\\, {\\dot{y}},\\, {\\dot{z}} \\gt$

"}︡ ︠0d24fdf1-563a-4172-846a-85fa24cc7182︠ ds2=diff(s2,t) view(ds2) ︡a2346a2f-91c1-445d-ae52-4ffae2496fbe︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(1,\\,\\frac{1}{2 \\, \\sqrt{t}},\\,0\\right)"}︡ ︠fe2c7edd-38e4-4697-9ac9-130fe8eb6485i︠ %html

Step 3: The program defines a standard sage function for "change of variables" for a 1-variable parametrization (curve).

The program changes the variables of $\vec F$ from a vector in x, y, z to a vector of t using the components of s(t).

︡e53dedac-344a-44f6-90ec-c9e088ec5784︡{"html": "
\n

Step 3: The program defines a standard sage function for \"change of variables\" for a 1-variable parametrization (curve).

\n

The program changes the variables of $\\vec F$ from a vector in x, y, z to a vector of t using the components of s(t).

"}︡ ︠4c2466e2-3311-4453-ba86-01164cd2f8bd︠ def changevar(h, eqn, newvar1): return h.substitute(eqn) ︡c352b9f9-d693-4551-a38b-9a92af3f434d︡︡ ︠f208a9fd-9c04-49ca-ae72-b773b45bca4e︠ F2=changevar(F2,x==s2[0],t) F2=changevar(F2,y==s2[1],t) F2=changevar(F2,z==s2[2],t) view(F2) ︡d59a0599-9366-44d2-87a1-b3a3165246f3︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(-\\sqrt{t},\\,t,\\,0\\right)"}︡ ︠89a352a2-098e-429a-861d-ebeede781d27i︠ %html

Step 4: Then program finds the dot product of the vectors from Step2 and Step3.

︡565c514d-598c-40d2-975f-6f070344332e︡{"html": "
\r\n

Step 4: Then program finds the dot product of the vectors from Step2 and Step3.

"}︡ ︠9be258d4-cb42-425a-bdbb-0c9613fc7896︠ integrand2=F2.dot_product(ds2) view(integrand2) ︡76a7836d-57f9-4a69-9607-951bfda9ad7f︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{1}{2} \\, \\sqrt{t}"}︡ ︠49dd7feb-af42-45cb-882b-3ed5f8624e30i︠ %html

Step 6: The program computes the integral (work).

︡12527d60-c72c-4d72-b5df-3f12003d08f2︡{"html": "
\n

Step 6: The program computes the integral (work).

"}︡ ︠1873d5f6-5335-4180-96de-2186eeaf0a37︠ result2=integral(integrand2,(t,t1,t2)) view(result2) ︡39045168-38b4-4c4d-be71-cfbf03f5fb33︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{1}{3}"}︡ ︠d1bb629a-33ea-4546-a785-b632fba0e484︠ n(result2) ︡4de2d66d-e151-421c-b585-2d0c664e4d73︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}-0.333333333333333"}︡ ︠5f101c26-dc1d-4dee-8af1-992a5c4a015ei︠ %html

So the work done by $\vec F = \lt -y, \, x \gt $ along the line curve $y=\sqrt{x}$ from (0,0) to (1,1) is: $\int_C \,(-ydx+xdy) = -1/3 \approx -0.33$  



Graph 2: We graph the vector field $\vec F$ and the curve $y=\sqrt{x}$  from (0,0) to (1,1).

︡8ed0b057-f6e5-4a36-a516-c1fd8a87894f︡{"html": "

\n

So the work done by $\\vec F = \\lt -y, \\, x \\gt $ along the line curve $y=\\sqrt{x}$ from (0,0) to (1,1) is: $\\int_C \\,(-ydx+xdy) = -1/3 \\approx -0.33$  

\n

\n

Graph 2: We graph the vector field $\\vec F$ and the curve $y=\\sqrt{x}$  from (0,0) to (1,1).

\n"}︡ ︠81de53c5-44fc-4ae0-8e8a-ed11115ad8dd︠ xmin=-2; xmax=2; ymin=-2; ymax=2; zmin=-1; zmax=1 VF2=plot_vector_field(vector((-y,x)), (x,xmin,xmax),(y,ymin,ymax), color='red') C2=parametric_plot(vector((t,sqrt(t))),(t,0,1)) show(VF2+C2) ︡f1dde260-8a44-4e2e-b524-e5c86e0d65cc︡{"html": ""}︡ ︠131b81b1-93c5-44a2-aca4-2a3050f90ea4i︠ %html


Problem 3: Calculate the line integral of work type $\int_C \,(-ydx+xdy) =0\,$ where $C: \,\, y=sin(\frac{\pi x}{2})$


Step 0: The program declares our variables. We are given variables (x,y,z). We need t as parameter.

︡cd443f56-714e-4667-9a97-1a38d44f51a0︡{"html": "


\n

Problem 3: Calculate the line integral of work type $\\int_C \\,(-ydx+xdy) =0\\,$ where $C: \\,\\, y=sin(\\frac{\\pi x}{2})$

\n
\n

Step 0: The program declares our variables. We are given variables (x,y,z). We need t as parameter.

"}︡ ︠48ccae07-53b9-4095-9597-9357ddfa2c1d︠ var ('t'); var('x y z') ︡d6712ad2-41e1-43e3-8a7a-f51688a5c541︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}t"}︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(x, y, z\\right)"}︡ ︠d17ab36a-2e16-4e78-ac43-589b51fb669ai︠ %html

Step 1: We define $C(t)=\vec s(t)$, the interval of t and $\vec F$. Changes with problem; you must input your parametrization of the curve, your interval for t (check orientation) and your vector function F(x,y,z).

︡7ef79968-bc85-49d1-ac4a-e5ccdd6ed4c5︡{"html": "
\n

Step 1: We define $C(t)=\\vec s(t)$, the interval of t and $\\vec F$. Changes with problem; you must input your parametrization of the curve, your interval for t (check orientation) and your vector function F(x,y,z).

"}︡ ︠8ddc81e0-f924-4590-ac05-2cdc56fdbaaf︠ s3=vector((t,sin(pi*t/2),0)) t1=0; t2=1 F3=vector((-y,x,0)) ︡1aaffb38-488d-4b8b-8c66-ba071c7989da︡︡ ︠7b1f1356-6139-4acf-8d18-dc833dec0d5fi︠ %html

Step 2: The program finds the vector function with the partial derivatives: $d \vec s(t)=\lt {\dot{x}},\, {\dot{y}},\, {\dot{z}} \gt$

︡0b0b4cad-e1a3-4214-ae5d-31627b0e9d75︡{"html": "
\n

Step 2: The program finds the vector function with the partial derivatives: $d \\vec s(t)=\\lt {\\dot{x}},\\, {\\dot{y}},\\, {\\dot{z}} \\gt$

"}︡ ︠9383c62f-1897-42d9-9871-0cd2f24407b0︠ ds3=diff(s3,t) view(ds3) ︡69137c27-bed4-42e4-8552-3fa028e590bd︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(1,\\,\\frac{1}{2} \\, \\pi \\cos\\left(\\frac{1}{2} \\, \\pi t\\right),\\,0\\right)"}︡ ︠c7ca400d-fec1-4faf-846a-ae6835805ddci︠ %html

Step 3: The program defines a standard sage function for "change of variables" for a 1-variable parametrization (curve).

The program changes the variables of $\vec F$ from a vector in x, y, z to a vector of t using the components of s(t).

︡0e695bd9-52e0-4b33-8fcd-aa37102a314a︡{"html": "
\n

Step 3: The program defines a standard sage function for \"change of variables\" for a 1-variable parametrization (curve).

\n

The program changes the variables of $\\vec F$ from a vector in x, y, z to a vector of t using the components of s(t).

"}︡ ︠2a44f2db-c6ed-42bd-9101-700a65d767a4︠ def changevar(h, eqn, newvar1): return h.substitute(eqn) ︡a1d01004-f3b6-4ed7-9cd1-6e371089b84a︡︡ ︠a43c7b94-63c1-4dda-8454-6b6ef9e77418︠ F3=changevar(F3,x==s3[0],t) F3=changevar(F3,y==s3[1],t) F3=changevar(F3,z==s3[2],t) view(F3) ︡4aa68bf9-16fb-4a3c-a4c0-2cdd2025b39c︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(-\\sin\\left(\\frac{1}{2} \\, \\pi t\\right),\\,t,\\,0\\right)"}︡ ︠1c094741-1d82-44b0-b312-7f47bbc22b44i︠ %html

Step 4: Then program finds the dot product of the vectors from Step2 and Step3.

︡d36572d7-fc6e-4f56-87f5-0c6daa5d6740︡{"html": "
\r\n

Step 4: Then program finds the dot product of the vectors from Step2 and Step3.

"}︡ ︠8d357e8b-868b-4fc6-a50c-7ef211586cb7︠ integrand3=F3.dot_product(ds3) view(integrand3) ︡14df000f-41bc-4337-a48f-bc2077083c0b︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{1}{2} \\, \\pi t \\cos\\left(\\frac{1}{2} \\, \\pi t\\right) - \\sin\\left(\\frac{1}{2} \\, \\pi t\\right)"}︡ ︠a2356e11-8714-4e7f-8c37-4d2f3f0034c9i︠ %html

Step 6: The program computes the integral (work).

︡e86f7c3b-419a-4b78-84d1-95062b47b325︡{"html": "
\n

Step 6: The program computes the integral (work).

"}︡ ︠c4cdddc4-ad5a-4c7f-9af0-ca95537145dc︠ result3=integral(integrand3,(t,t1,t2)) view(result3) ︡a2189e09-2a80-44e5-a03f-ef335207b89f︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{\\pi - 4}{\\pi}"}︡ ︠7f9c3d9b-d68e-4ae0-8563-b96a7fff289e︠ n(result3) ︡a0ddf704-9f46-41cd-b6a6-a8a949911a42︡{"html": "\\newcommand{\\Bold}[1]{\\mathbf{#1}}-0.273239544735163"}︡ ︠adf64db0-2444-4bd6-bd7e-3283926b8f14i︠ %html

So the work done by $\vec F = \lt -y, \, x \gt $ along the line curve $y=\sin ({{\pi x} \over 2})$ from (0,0) to (1,1) is: $\int_C \,(-ydx+xdy) = \frac{\pi-4}{\pi} \approx -0.27$  



Graph 1: We graph the vector field $\vec F$ and the curve $y=\sin ({{\pi x} \over 2})$  from (0,0) to (1,1).

︡1e8e156e-2c8b-4b3c-8472-1b3041b955b3︡{"html": "

\n

So the work done by $\\vec F = \\lt -y, \\, x \\gt $ along the line curve $y=\\sin ({{\\pi x} \\over 2})$ from (0,0) to (1,1) is: $\\int_C \\,(-ydx+xdy) = \\frac{\\pi-4}{\\pi} \\approx -0.27$  

\n

\n

Graph 1: We graph the vector field $\\vec F$ and the curve $y=\\sin ({{\\pi x} \\over 2})$  from (0,0) to (1,1).

\n"}︡ ︠6f618b12-0184-49f2-8a62-fe4124c9002d︠ xmin=-2; xmax=2; ymin=-2; ymax=2; zmin=-1; zmax=1 VF3=plot_vector_field(vector((-y,x)), (x,xmin,xmax),(y,ymin,ymax), color='red') C3=parametric_plot(vector((t,sin(pi*t/2))),(t,0,1)) show(VF3+C3) ︡8ca56324-99b0-4f6d-b9d5-c8b40c7865fe︡{"html": ""}︡