use green therom to find counter clockwise circulation and outward flux

7 visualizzazioni (ultimi 30 giorni)
use green therom to find counter clockwise circulation and outward flux for the field F=(7x-3y)i+(7y-3x)j and the curve C,the square bounded by x=0,x=7,y=0,y=7
i have solved this the flux is 686 and circulation is 0 my code isnt working though incorrect number or types of inputs or outputs for function
% Define the vector field F
syms x y
F = [7*x-3*y, 7*y-3*x];
% Define the integrand as a symbolic expression
G = diff(F(2), x) - diff(F(1), y);
% Convert the integrand to a numeric function
Gfun = matlabFunction(double(G));
% Evaluate the double integral of the integrand over the region D
flux = integral2(Gfun, 0, 7, 0, 7);
% Evaluate the line integral of F around the square
circulation = integral(F(1), 0, 7) + integral(F(2), 0, 7)...
+ integral(-F(1), 7, 0) + integral(-F(2), 7, 0);
% Print the results
disp(['The outward flux of F across the square is ', num2str(flux)]);
disp(['The circulation of F around the square is ', num2str(circulation)]);

Risposte (2)

VBBV
VBBV il 7 Mar 2023
Modificato: VBBV il 7 Mar 2023
% Define the vector field F
syms x y
F = [7*x-3*y, 7*y-3*x];
% Define the integrand as a symbolic expression for Circulation
G = diff(F(2), x) - diff(F(1), y)
G = 
0
% Convert the integrand to a numeric function
% Evaluate the double integral of the integrand over the region D
flux = int(int(F, 0, 7), 0, 7)
flux = 
% Evaluate the line integral of F around the square (counterclockwise
% direction)
circulation = int(F(1), 0, 7) + int(F(2), 0, 7)...
+ int(-F(1), 7, 0) + int(-F(2),7, 0)
circulation = 
% Print the results
disp(['The outward flux of F across the square is ', num2str(double(flux))]);
The outward flux of F across the square is 686 686
disp(['The circulation of F around the square is ' ,char(circulation)]);
The circulation of F around the square is 56*y + 196
  3 Commenti
Joshua Thompson
Joshua Thompson il 12 Mar 2023
very nice it gave the flux but gave the circulation as a equation of y
VBBV
VBBV il 13 Mar 2023
% Define the vector field F
syms x y
F = [7*x-3*y, 7*y-3*x];
% Define the integrand as a symbolic expression for Circulation
G = diff(F(2), x) - diff(F(1), y)
G = 
0
% Convert the integrand to a numeric function
% Evaluate the double integral of the integrand over the region D
flux = int(int(F, 0, 7), 0, 7)
flux = 
% Evaluate the line (double) integral of F around the square (counterclockwise
% direction)
circulation = int(int(F(1), 0, 7),0,0) + int(int(F(2), 0, 7),7,7)...
+ int(int(-F(1), 7, 0),7,7) + int(int(-F(2),7, 0),0,0)
circulation = 
0
% Print the results
disp(['The outward flux of F across the square is ', num2str(double(flux))]);
The outward flux of F across the square is 686 686
disp(['The circulation of F around the square is ' ,char(circulation)]);
The circulation of F around the square is 0

Accedi per commentare.


Paul
Paul il 12 Mar 2023
Isn't the answer 0? Using the approach referenced here
syms x y real
% vector field
F = [7*x-3*y, 7*y-3*x];
% Define the integrand as a symbolic expression
G = diff(F(2), x) - diff(F(1), y)
G = 
0
The area integral must be zero, but compute it anyway
flux = int(int(G,x,0,7),y,0,7);
% Evaluate the line integral of F around the square
% C1 is the segment from (0,0) to (7,0)
% C1 as parmeterized by t: c(t) = (t,0) 0 <= t <= 7
syms t real
c(t) = [t, 0];
dc(t) = diff(c(t),t);
iC1 = int(dot(subs(F,[x y],c(t)),dc(t)),t,0,7);
% C2 is the segment from (7,0) to (7,7)
% C2 as parmeterized by t: c(t) = (7,t) 0 <= t <= 7
c(t) = [7, t];
dc(t) = diff(c(t),t);
dc(t) = diff(c(t),t);
iC2 = int(dot(subs(F,[x y],c(t)),dc(t)),t,0,7);
% C3 is the segment from (7,7) to (0,7)
% C3 as parmeterized by t: c(t) = (t,7) 7 >= t >= 0
c(t) = [t, 7];
dc(t) = diff(c(t),t);
iC3 = int(dot(subs(F,[x y],c(t)),dc(t)),t,7,0);
% C4 is the segment from (0,7) to (0,9)
% C4 as parmeterized by t: c(t) = (0,t) 7 >= t >= 0
c(t) = [0, t];
dc(t) = diff(c(t),t);
dc(t) = diff(c(t),t);
iC4 = int(dot(subs(F,[x y],c(t)),dc(t)),t,7,0);
circulation = iC1 + iC2 + iC3 + iC4;
% Print the results
disp(['The outward flux of F across the square is ', num2str(double(flux))]);
The outward flux of F across the square is 0
disp(['The circulation of F around the square is ', num2str(double(circulation))]);
The circulation of F around the square is 0

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by