So I’m doing some instruction items about surface integrals. I’ve written the following code. it calculates curl and partial derivatives of the surface. I now want to create the following function, which will be my integrand. Merely dot producting the two vectors doesn’t change the signs like I need. Is there a way to says multiply one element of a vector times its corresponding one and changing the sign, along the way?
What I want to do is change the sign of the first two elements created by the dot product, whle leaving the third alone.
Here’s my code;
F = {2 z, 4 x, 5 y};
Print("The curl is:")
NewF = Curl(F, {x, y, z}) (*Step 1*)
g = x + 4;(*Step 3 solving for z of the curve*)
Print("The partial derivatives of z are the following (with 1 as a placeholder for R):")
g1 = {D(g, x), D(g, y), 1}(*Step 4, the partials of z*)
Print("The new integrand is the following (don't forget to sub g for z.")
NewF . g1
The curl is shown to be 5,2,4 and the partials are 1,0,1. But a correct answer for what i want to do gives 1 as the ‘new integrand’ while the code here gives ‘9.”
Any thoughts?