Find the work done for the force ๐นโ(x,y,z)= yz๐โ + xz ๐โ + (xy+2z) ๐โโ along the line segment from (1,0,-2) to (4,6,3)
68 views (last 30 days)
Show older comments
Find the work done for the force ๐นโ(x,y,z)= yz๐โ + xz ๐โ + (xy+2z) ๐โโ along the line segment from (1,0,-2) to (4,6,3)
5 Comments
Accepted Answer
More Answers (1)
Surya
on 21 Nov 2023
clc
clear all
syms x y z t
f=input('Enter the components of 3D vector function [u,v,w] ');
r=input('Enter x,y,z in parametric form');
I=input('Enter the limits of integration for t in the form [a,b]');
a=I(1);b=I(2);
dr=diff(r,t);
F=subs(f,{x,y,z},r);
Fdr=sum(F.*dr);
I=int(Fdr,t,a,b)
P(x,y,z)=f(1);Q(x,y,z)=f(2); R(x,y,z)=f(3);
x1=linspace(0,1,10); y1=x1; z1=x1;
[X,Y,Z] = meshgrid(x1,y1,z1);
U=P(X,Y,Z); V=Q(X,Y,Z); W=R(X,Y,Z);
quiver3(X,Y,Z,U,V,W,1.5)
hold on
t1=linspace(0,1,10);
x=subs(r(1),t1);y=subs(r(2),t1);z=subs(r(3),t1);
plot3(x,y,z,'r')
2 Comments
Raghav
on 27 Nov 2023
Moved: DGM
on 28 Nov 2023
clear
clc
syms x y z t
f=[y*z,x*z,x*y+2*z];
r=[3*t+1,6*t,5*t-2];
I=[0,1];
a=I(1);b=I(2);
dr=diff(r,t);
F=subs(f,{x,y,z},r);
Fdr=sum(F.*dr);
I=int(Fdr,t,a,b)
P(x,y,z)=f(1);Q(x,y,z)=f(2); R(x,y,z)=f(3);
x1=linspace(0,1,10); y1=x1; z1=x1;
[X,Y,Z]=meshgrid(x1,y1,z1);
U=P(X,Y,Z); V=Q(X,Y,Z); W=R(X,Y,Z);
quiver3(X,Y,Z,U,V,W,1.5)
hold on
t1=linspace(0,1,10);
x=subs(r(1),t1);y=subs(r(2),t1);z=subs(r(3),t1);
plot3(x1,y1,z1,'r')
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!