Physics 4392: Professor Olness  Fall 2001

Exan #1

Turn of some anoying features

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

Load the needed packages:

<<Graphics`PlotField`

<<Graphics`PlotField3D`

<<Calculus`VectorAnalysis`

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

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

Problem 1:

This is a good way to clear things between problems:

Clear["Global`*"]

v = {y x^2,  3 y z ,  y^2};
dℓ =  {dx,  dy,  dz};
integrand =  v . dℓ

Solve[{2 y  +  z  == 2}, {z}]  // Flatten

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

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

Problem 2:

Clear["Global`*"]

v = {y x^2,  3 y z ,  y^2};
da =  {+dy dz, 0, 0};
integrand =  v . da

Solve[{ y  +  z  == 1}, {z}]  // Flatten

integrand = integrand  /. {x -> 1}  // Simplify

Integrate[
      integrand /(dy dz), {z, 0, 1}, {y, 0, 1 - z}]

Problem 3:

This is a good way to clear things between problems:

Clear["Global`*"]

?DiracDelta

a)

Integrate[ (9 (x^2) +  3 x  +  1)  DiracDelta[
          3 x - 1], {x, -2, 2}]

(9 (x^2) +  3 x  +  1) (1/3)  /. {x -> 
          1/3}

b)

Integrate[ (9 (x^2) +  3 x  +  1)  DiracDelta[
          x - 3], {x, -2, 2}]

Problem 4:

This is a good way to clear things between problems:

Clear["Global`*"]

SetCoordinates[Spherical[r, θ, ϕ]];

e = r Sin[θ] Cos[ϕ] {1, 1, 1}/(Subscript[ϵ, 0])

(Subscript[ϵ, 0]) Div[e]

(Subscript[ϵ, 0]) Div[e]  // Simplify

Problem 5:

This is a good way to clear things between problems:

Clear["Global`*"]

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

va = {-2 y, 0, -x};
vb = {(y^2), 2 x y, 0};

{Curl[va], Curl[vb]}

{Div[va], Div[vb]}

Curl[{x y,  2 y z,  0}]  == va

Curl[{y x,  2 y z,  
          z}] ==va

Grad[x y^2 ] == vb

Problem 6:

This is a good way to clear things between problems:

Clear["Global`*"]

integrand[r, ϕ, z]  = 
      (1/(4 π (Subscript[ϵ, 0]))) ρ[r, 
              z]/ℛ[r, z]^2 Cos[ψ[r, z]]

ℛ[r, 
          z]  =  (Sqrt[(((z0 - z))^2) +  (r^2)]);
ρ[r, z] =  (r^2) 
          Sin[ϕ]^2;
Cos[ψ[r, 
            z]] ^= (( (z0 - z))/ℛ)[r, z];

integrand[r, ϕ, z]

e  =  (∫_(-L/2)^(+L/2))(∫_0^(2 π))(∫_0^R) 
                  integrand[r, ϕ, 
                      z]   r \[DifferentialD]r   \[DifferentialD]ϕ \[DifferentialD]z  // 
            Simplify  // PowerExpand  // Simplify

Variables[e]

Problem 7:

This is a good way to clear things between problems:

Clear["Global`*"]

e   = Q/((Subscript[ϵ, 0]) area)

λrule =  
      Solve[{ρ/L  ==  λ/V,  ρ ==  
                c (r^2),  V  ==  π (r^2) L }  /. 
            r -> a, {c, ρ, V}]  // Flatten

Inside:

q[r_] =  Integrate[ 2 π L c r^2  r , {r, 0, r}]

eInside = 
      e   /. {Q -> q[r], area  ->  2 π r L}

vInside = - Integrate[eInside, {r, a, r}]  // Simplify

Outside:

eOutside  = 
      e /. {Q -> q[a], area  ->  2 π r L}

eOutside  /. λrule

vOutside = - 
          Integrate[eOutside, {r, b, r0}]   /. {r0 -> r}

{eInside, eOutside }  /. {r -> a}

eInside == eOutside  /. {r -> a}

Capacitance:

δV = - Integrate[
          eOutside, {r, b, a}]

δV = - 
            Integrate[
              eOutside, {r, b, 
                a}]   /. λrule  /. {λ -> 
            Q/L}

δV = δV   /. {(Log[x1_] - Log[x2_]) :> 
            Log[x1/x2]}

c = (Q/δV)

c/L