HW2, EECS 203A. UCI, FALL 2004
by Nasser Abbasi

Part(a).
Given 
            s=T(r)=(e^(-α(r^2))) ----- (1)
To solve, note that 
             s=(A/2)when r=(Subscript[L, 0]) -----(2)
So, sub (2) into (1), we get
(A/2) = (e^(-α((Subscript[L, 0])^2))), take the natural log of both sides we get
log((A/2))=-α((Subscript[L, 0])^2)
-α=((log((A/2)))/(((Subscript[L, 0])^2)))
Hence the transformation is  
            s=T(r)=(e^((((log((A/2)))/(((Subscript[L, 0])^2))))(r^2)))    -------(3)
When r=   0, s=    A, hence
           A=(e^((((log((A/2)))/(((Subscript[L, 0])^2))))0))=(e^0) = 1
           Hence A=1
  so (3) becomes
           s=T(r)=(e^((((log((1/2)))/(((Subscript[L, 0])^2))))(r^2)))
  But problem says to keep the constants A and  (Subscript[L, 0]) in the specification of T. So the final answer is as shown in (3) above.
  
Below I plot the curves for different values of  (Subscript[L, 0]), A

Options[Plot]

<< Utilities`Notation`
Clear["Global`*"];
Symbolize[(Subscript[L, 0])];

\(\(\(
\)\(\(s[A_, \(L\_0\) : _, 
        r_] := E\^\(\((Log[A\/2]\/L\_0\^2)\) r\^2\)\)\(
\)
    \(p = Table[0, {i, 1, 3}]\)\(
\)
    \(n = 0;\)\(
\)
    \(For[A =  .1, A < 1, 
      A = A +  .3, 
\ \ \ \ \ \ \ {\ 
        For[{n = 0, L\_0 =  .1}, 
          L\_0 < 1, {L\_0 = L\_0 +  .3, 
            n = n + 1}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Print["A=", A]; 
            Print["L=", 
              L\_0]; 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p[[n]] = 
              Plot[Evaluate[s[A, L\_0, r], {r, 0, 1}, 
                  PlotRange -> {0, 
                      1}, \ \ 
\ \ \ \ \ \ \ \ \ \ \ \ AxesOrigin -> {0, 0}, PlotLabel -> {"A=", A, "L=", L\_0}, 
                  DisplayFunction -> 
                    Identity]]; 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ Information[
              p[[
                n]]]; 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ Print["n=", 
              n]
\ \ \ \ \ \ \ \ \ \ \ \ \ }]; 
\ \ \ \ \ \ \ \ Show[GraphicsArray[p], 
          DisplayFunction -> $DisplayFunction];
\ \ \ \ }]\)\(
\)
    \(\ \ \ \ \)\)\)\)

?For

Part(b)
          s=T(r)=(e^(-α(r^2))) ----- (1)
To solve, note that 
             s=(B/2)when r=(Subscript[L, 0]) -----(2)
So, sub (2) into (1), we get
(B/2) = (e^(-α((Subscript[L, 0])^2))), take the natural log of both sides we get
log((B/2))=-α((Subscript[L, 0])^2)
-α=((log((B/2)))/(((Subscript[L, 0])^2)))
Hence the transformation is  
            s=T(r)=(e^((((log((B/2)))/(((Subscript[L, 0])^2))))(r^2)))    -------(3)
            
When r=   1, s=B, hence

           B=(e^((((log((B/2)))/(((Subscript[L, 0])^2))))1))=> log(B)=((log((B/2)))/(((Subscript[L, 0])^2)))
           log(B)=((log(B) - log(2))/((Subscript[L, 0])^2))
            ((Subscript[L, 0])^2) log(B)=log(B) - log(2)
            log(B)(((Subscript[L, 0])^2)-1)=-log(2)
            log(B)=((-log(2))/((((Subscript[L, 0])^2)-1)))=((-0.6931471805599453`)/(((Subscript[L, 0])^2)-1))
            B=(e^((-0.6931471805599453`)/(((Subscript[L, 0])^2)-1)))

Clear["\
Global`*"];

    s[(Subscript[L, 0]) : _, r_] :=  
        Block[{B},  
B = 
            Exp[-Log[2]/((Subscript[L, 0])^2  - 1)]; 
Exp[
            Log[B/2] r^2/ (Subscript[L, 0])^2]
];

data = Table[s[(Subscript[L, 0]), r], {(Subscript[L, 0]),  .001,  .9,  .1}]

s[ .1,  .4] // N
Plot[Evaluate[data], {r, 0.01, 1}, 
        PlotRange -> {0, 5} ];

Simplify[Log[Exp[x]]]

Simplify[Exp[Log[x]]]

Plot[Log[x], {x, 0.0001, 1}]

?GraphicsArray

?Array

Clear[f]; f = Table[0, {i, 1, 3}]; 
    f[[1]] = 3; f

f