Archive for November, 2007


Analysis of Today’s Putman Problem

November 28th, 2007

I found an interesting problem on the blog Reasonable Deviations.

Question:
Given a plane k, a point P in the plane and a point Q not in the plane, find all points R in k such that the ratio \frac{QP+PR}{QR} is a maximum.

Solution:
First, create a plane that intersects the points Q, P, and R. In addition to these 3-points, I’m going to create a 4th point point called R’ which is perpendicular to the plane.


Using Pythagoras Theorem, we can do the following:
\frac{QP+PR}{QR} = \frac{\sqrt{QR^{\prime 2}+PR^{\prime 2}}+RR^{\prime}+PR^{\prime}}{\sqrt{QR^{\prime 2}+RR^{\prime 2}}}

We can simplify the formula by using the following relations: x = RR^{\prime}, y = QR^{\prime}, z = PR^{\prime}. The important thing to note is that x is the only variable. The other variables are constant.

The formula can be reduced to:

f(x) = \frac{\sqrt{y^{2}+z^{2}}+x+z}{\sqrt{y^{2}+x^{2}}}

The maximum of f(x) will occur when its derivative is 0. Therefore,

\frac{d}{dx}f(x) = \frac{d}{dx}(\frac{\sqrt{y^{2}+z^{2}}+x+z}{\sqrt{y^{2}+x^{2}}}) = 0

\frac{d}{dx}f(x) = \frac{1}{\sqrt{y^{2}+x^{2}}}-\frac{(\sqrt{y^{2}+z^{2}}+x+z)x}{(y^{2}+x^{2})^{\frac{3}{2}}} = 0

\frac{1}{\sqrt{y^{2}+x^{2}}} = \frac{(\sqrt{y^{2}+z^{2}}+x+z)x}{(y^{2}+x^{2})^{\frac{3}{2}}}

y^{2}+x^{2} = (\sqrt{y^{2}+z^{2}}+x+z)x

y^{2} = (\sqrt{y^{2}+z^{2}}+z)

x = \frac{y^{2}}{\sqrt{y^{2}+z^{2}}+z}

Therefore, the point R will a distance x away from R’ defined by the following equation:

RR^{\prime} = \frac{QR^{\prime 2}}{QP+PR^{\prime}}

RR^{\prime} = \frac{QP^2-PR^{\prime 2}}{QP+PR^{\prime}}

RR^{\prime} = \frac{(QP-PR^{\prime})(QP+PR^{\prime})}{QP+PR^{\prime}}

RR^{\prime} = QP-PR^{\prime}

PR=QP

Question: Particle in electric and magnetic field

November 24th, 2007

Question: Write down the equation of motion for a charged particle in uniform, parallel electric and magnetic fields, both in the z-direction, and solve it, given that the particle starts from the origin with the velocity (v_0,0,0). A screen is placed at x=a where a \ll  \frac{mv}{qB}. Show that the locus of points of arrival of particles with given m and q, but different speeds v_0, is approximately a parabola.

Answer: Optimize Material Cost of an Ice Tray

November 24th, 2007

Answer: The simplest way to calculate the optimal dimensions of the ice tray will be to use Lagrangian Multipliers which states that the extrema of a function f(x,y,z), which is subjected to constraints g(x,y,z), will satisfy the following conditions:

\nabla f(x,y,z) = \lambda \nabla g(x,y,z)

In this example, the function f(x,y,z) will be the cost function:
f(x,y,z) = xy +3xz + 7yz

In order to construct g(x,y,z), it is a little more complicated. Since the volume of each compartment needs to be 12 cm^{3}, we can represent this constraints with the following formula: V = \frac{x}{6}\frac{y}{2}z = 12. Therefore g(x,y,z) would be:
g(x,y,z) = \frac{x}{6}\frac{y}{2}z -12 = 0

Since the horizontal cross-section is a square, we can use the constraint \frac{x}{6} = \frac{y}{2} to simply the equations. The equations will be reduced to:
f(x,z) = \frac{x^{2}}{3} + \frac{16}{3}xz

g(x,z) = x^{2}z -432 = 0

Now we use the relation,
\nabla f(x,z) = \lambda \nabla g(x,z)

to calculate the optimal dimensions of the ice tray.
\nabla f(x,z) = \lambda \nabla g(x,z)

\nabla (\frac{x^{2}}{3} + \frac{16}{3}xz) = \lambda \nabla (x^{2}z - 432)

\begin{pmatrix} \frac{2x}{3} + \frac{16}{3}z =  \lambda 2xz \\ \frac{16}{3}x = \lambda x^{2} \end{pmatrix}

\lambda = \begin{pmatrix} \frac{1}{3z} + \frac{8}{3x} \\ \frac{16}{3x}  \end{pmatrix}

Therefore,
\frac{1}{3z} + \frac{8}{3x} = \frac{16}{3x}

16 = \frax{x}{z} + 8

8z = x

Next, insert this relation in g(x,z).
g(x,z) = x^{2}z -432 = 0

g(x,z) = (8z)^{2}z -432 = 0

z = \frac{3}{2} \sqrt[3]{2}

Therefore, using the relationships we calculated above:
\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 12 \\ 4 \\ \frac{3}{2} \end{pmatrix}\sqrt[3]{2}

Question: Optimize Material Cost of an Ice Tray

November 18th, 2007

Question: The ice tray, shown below, is made from material that costs 1 cent/cm^{2}. Minimize the cost function f(x,y,z) = xy +3xz + 7yz subject to the constraints that each of the 12 compartments is to have a square horizontal cross section and that the total volume (ignoring the partitions) is to be 12 cm^{3}.

Maple: Variation of Predator-Prey Model

November 17th, 2007

> restart; a := 20; alpha := 2; sigma := .3; c := 30; g := 2

20
2
0.3
30
2

> e1 := diff(x(t), t) = a*x(t)-alpha*x(t)*y(t)-sigma*x(t)^2;
> e2 := diff(y(t), t) = -c*y(t)+g*x(t)*y(t);

\frac{d}{dt}x(t) = 20x(t) - 2x(t)y(t) - .3x(t)^{2}
\frac{d}{dt} y(t) = -30y(t) + 2 x(t)y(t)

> solve({rhs(e1) = 0, rhs(e2) = 0}, {x(t), y(t)}):
> sol(1):
> with(DEtools): with(plots):
> DEplot({e1, e2}, {x(t), y(t)}, t = 0 .. 5, [[x(0) = 15, y(0) = 7]], stepsize = 3)

> plotX := DEplot({e1, e2}, {x(t), y(t)}, t = 0 .. 4, [[x(0) = 1, y(0) = 1]], stepsize = 3, scene = [t, x], arrows = NONE, linecolor = RED);
> plotY := DEplot({e1, e2}, {x(t), y(t)}, t = 0 .. 4, [[x(0) = 1, y(0) = 1]], stepsize = 3, scene = [t, y], arrows = NONE, linecolor = BLUE);
> plots[display]([plotX, plotY])