P-1: Individual Solutions

Problem 1

Clear[bhf, x]

bhf[
        x_]  =  (-1/x^(1  -  x  +  x^x))*(1  +  
            x*Log[x]*(1 + Log[x]))

Plot[bhf[x], {x, 0, 3}, PlotRange -> {-3, 0}, 
        PlotLabel -> "BigHarryFunction[x]"];

1 (a)

These first few calculations simply find the integral and derivative.

hm[x_] = 
      Integrate[bhf[ζ], { ζ,  x, ∞}, 
        Assumptions -> x > 0]

1 (b)

hd[x_] = D[bhf[x], x]

To find the global min, look at the plot to see that the function is at a min near 0.

1 (c)

Limit[bhf[x],  x -> 0]

Similar logic here, but the max is as x -> infinity

Limit[bhf[x],  x -> 100]

Again, the plot allows for a ball-park x-value to search for a maximum and minimum.

Maximize[bhf[x],   .5 < x < 1.5, x]

Minimize[bhf[x],  1.25 < x < 1.75, x]

To find an inflection point, follow the same steps as above. Note the use of Abs[ ] which allows large negative numbers to be discarded so that the minimum is the value closest to 0.

Minimize[Abs[D[hd[x], x]],  .8 < x < 1.5, x]

Problem 2

2(a)

Clear[a, b, r]

LJ[r_]  =  a/r^12  -  b/r^6

SetofRmin  =  Solve[LJ'[r] == 0,  r]

Note the two complex conjugates and the 2 pairs of repeated real roots.  Engineering judgment dictates that energy must be > 0 and real, so the second or third root will work.

MinRadius  =  r /. SetofRmin[[2]]

Substituting Rmin back into the Lennard-Jones equation yields an expression for the minimum energy, Emin, which occurs at Rmin.

MinEnergy  =  LJ[MinRadius]

We now have two equations relating 2 unknowns to Rmin and Emin. Flatten[ ] is a good way to remove a nested list from within itself.  Try fiddling around with it to see what I mean.

Substitution  =  
      Flatten[Solve[{Rmin == MinRadius,  Emin == MinEnergy},  {a, 
            b}]]

Now substitute.

LegitLJ[r_]  =  LJ[r] /. Substitution

2 (b)

From first principles, energy is the integral of a force over a distance.  Thus, by the fundamental theorem of Calculus, force is simply the derivative of energy, or d(LJ(r))/dr = Force.

Force[r]  =  -LegitLJ'[r]

2 (c)

To find the spring constant through power series expansion, we use a Taylor series to expand the Lennard-Jones equation.  From first principles, Energy = 0.5 (kx^2).  Therefore, we can equate the power-2 term in the Taylor expansion to this expression and solve for the spring constant, k.

Series[LegitLJ[r], {r, Rmin, 2}]

Note that (((r - Rmin))^2)is the variable of the series expanded about Rmin, so it is not a part of the coefficient used to solve for k. Depending on your concept of energy and distance, the spring constant can be solved such that it returns a positive value.  This means a force on a spring in one direction causes the spring to move in the same direction.  You can also think of it in terms of the reaction force of the spring (which would require the force to be negative relative to position, r). So, here I chose potential to be the integral of F = -kx, so as to return a positive k.

SpringConstant  = 
      k /. Flatten[
          Solve[((36 Emin )/(Rmin^2)) == 0.5 k, 
            k]]

2 (d)

Vibrational frequency is given by: ν = (Sqrt[k/m]) in terms of rad/s.  To convert to non-angular frequency, divide by 2*π.  This is simply plug-n-chug.

VFrequency  =  (((SpringConstant/m))^0.5)