Physics 4392: Professor Olness  Fall 2001

HOMEWORK SET #1:Due Tuesday Sept.4 at 5pm.Griffiths,3rd edition:Problems:Chapt.#1:3,11,12,15,18,25,28,33

You can do some in Mathematics,but I want to see you compute
at least 1 Grad,Div,and Curl by hand.

Turn of some anoying features

Off[General::"spell1"] ; Off[
        General::"spell"] ;

Load the needed packages:

<<Graphics`PlotField`

<<Graphics`PlotField3D`

<<Calculus`VectorAnalysis`

Load the needed packages:

SetCoordinates[Cartesian[x, y, z]];

Problem 1.3:

This is a good way to clear things between problems:

Clear["Global`*"]

a = {1, 0, 0};
b = {1, 1, 1};

length[v_] = Sqrt[v . v]

eq = a . b ==  length[a] length[b] Cos[θ]

sol = Solve[eq, θ]

?Degree

θ /Degree  /. sol  // N

Problem 1.11:

This is a good way to clear things between problems:

Clear["Global`*"]

f1 = (x^2) + (y^3) + (z^4);
f2 = (x^2)  (y^3) (z^4);
f3 =  (E^x) Sin[y] Log[z]

Grad[f1]

Grad[f2]

Grad[f3]

Problem 1.12:

This is a good way to clear things between problems:

Clear["Global`*"]

h =  
      10 ( 2 x y  -  3 (x^2) -  4 (y^2) -  18 x  +  28 y  +  
            12)

Plot3D[h, {x, -10, 10}, {y, -10, 10}];

ContourPlot[h, {x, -10, 10}, {y, -10, 10}];

?FindMinimum

FindMinimum[-h, {x, -0}, {y, 0}]

Height is +720, position is {x,y}={-2,3}:

h /. {x ->  -2,  y ->  3}

eqs = {D[h, x], D[h, y]}   == 0  // Thread

Solve[eqs, {x, y}]

grad =  Grad[h]

grad  /. {x ->  1,  y ->  1}

Problem 1.15:

This is a good way to clear things between problems:

Clear["Global`*"]

va = {(x^2), 3 x (z^2),  -2 x z};
vb = {x y,  2 y z,  3 z x};
vc = {(y^2),  2 x y  +  (z^2), 2 y z };

Div[va]

Div[vb]

Div[vc]

Problem 1.18:

This is a good way to clear things between problems:

Clear["Global`*"]

va = {(x^2), 3 x (z^2),  -2 x z};
vb = {x y,  2 y z,  3 z x};
vc = {(y^2),  2 x y  +  (z^2), 2 y z };

Curl[va]

Curl[vb]

Curl[vc]

Problem 1.25:

This is a good way to clear things between problems:

Clear["Global`*"]

?Laplacian

ta =  
        (x^2) +  2 x y  +  3 z  +  4;
tb  =  Sin[x] Sin[y] Sin[z];
tc =  (E^(-5 x)) 
          Sin[4  y] Cos[3 z];
v = {(x^2),  3 x (z^2),  - 2 x z };

Laplacian[ta]

Laplacian[tb]

Laplacian[tc]

Laplacian[v]

Problem 1.28:

This is a good way to clear things between problems:

Clear["Global`*"]

v = {(x^2),  2 y z,  (y^2)};

Route A:

Part 1

L1 = {dx, 0, 0};

L1 . v

integrand =  L1 . v  /. {y -> 0, z -> 0}

part1 =  Integrate[integrand/dx, {x, 0, 1}]

Part 2

L2 = {0, dy, 0};

L2 . v

integrand =  L2 . v  /. {x -> 1, z -> 0}

part2 =  Integrate[integrand/dy, {y, 0, 1}]

Part 3

L3 = {0, 0, dz};

L3 . v

integrand =  L3 . v  /. {x -> 1, y -> 1}

part3 =  Integrate[integrand/dz, {z, 0, 1}]

Total

total = part1 + part2 + part3

Route B:

Part 1

L1 = {0, 0, dz};

L1 . v

integrand =  L1 . v  /. {x -> 0, y -> 0}

part1 =  Integrate[integrand/dz, {z, 0, 1}]

Part 2

L2 = {0, dy, 0};

L2 . v

integrand =  L2 . v  /. {x -> 0, z -> 1}

part2 =  Integrate[integrand/dy, {y, 0, 1}]

Part 3

L3 = {dx, 0, 0};

L3 . v

integrand =  L3 . v  /. {y -> 1, z -> 1}

part3 =  Integrate[integrand/dx, {x, 0, 1}]

Total

total = part1 + part2 + part3

Route C:  Note, along this line: x=y=z.

L1 = {dx, dy, dz};

L1 . v

integrand =  
      L1 . v  /. {y -> x,  z -> x,  dy -> dx,  
          dz -> dx}

total =  Integrate[integrand/dx, {x, 0, 1}]

D:  Closed loop of out on A, back on B: = (+A) +(- B) = (+4/3)+(-4/3)= 0;

Problem 1.33:

This is a good way to clear things between problems:

Clear["Global`*"]

By doing a surface integral

v = {x y,  2 y z,  3 z x}

Curl[v]

da = dy dz \(TraditionalForm\`\(x\&^\)\) with restrictions: as y={0,2}, z={0,2-y}, that is: y+z ==2

da =  {dy dz ,  0, 0}

Curl[v] . da

Integrate[
      Curl[v] . da/(dy dz)  /. {x -> 0}, 
{y, 0, 
        2}, {z, 0, 2 - y}]

By doing a line integral

Leg 1:

L1 = {0, dy, 0};

integrand =  L1 . v /. {x -> 0, z -> 0}

part1 =  Integrate[integrand/dy, {y, 0, 2}]

Leg 2:

L2 = {0, dy, dz};

integrand =  L2 . v

integrand = integrand  /. {dz -> -dy}  /. {x -> 
            0,  z ->  2 - y}

part2 =  Integrate[integrand /dy, {y, 2, 0}]

Leg 3:

L3 = {0, 0, dz};

integrand =  L3 . v /. {x -> 0, y -> 0}

part3 =  Integrate[integrand/dz, {z, 2, 0}]

Total

total = part1 + part2 + part3