Lever Mechanics - How to formulate an ideal lever launch Let's say I have a simple lever as shown below, and the lever is massless and the pivot is frictionless and there is no air resistance. I'm thinking the cradle for the projectile would have to have a specific shape to dictate the launch angle, but for the context of a general equation $\theta$ will be the angle the lever makes parallel to the ground, and will have some value where the object will leave the lever. $\theta_{launch}$ will refer to the angle the lever is at when the object 'launches', so the lever will have swept $\theta_0 - \theta_{launch}$. $t_0$ is the initial time the weight is released and $t_{launch}$ = launch time.

Height Functions
$h_{weight}(\theta) = h_{pivot} + l_{shortArm}cos(\theta)$
$h_{projectile}(\theta) = h_{pivot} - l_{longArm}cos(\theta)$
Desired Equations

*

*Potential Energy of the system at Initial Conditions

*Velocity of Projectile at Launch

*KE of Projectile at Launch

*Efficiency of machine

 A: I am going to change the notation in order to make the equations more compact. The counter weight is $M$ and the payload is $m$. The length of the bar is $L$ and the distance of the center of gravity to the counterweight is $a=\frac{m}{M+m}\,L$ and from the payload $b=\frac{M}{M+m}\,L$ such that $L=a+b$. Note I have said nothing about the pivot yet.
The distance between the pivot and the center of gravity is $c$ and it is an independent variable we wish to optimize. The pivot is between the center of gravity and the payload (for positive $c$). The angle of the bar is $\theta$ with $\theta=0$ when horizontal. 

The height of the pivot from the ground is $h$ such that when the counterweight hits the ground the payload is launched at $\theta_{f} = -45^\circ$. So $h=(a+c) \sin(- \theta_f$). As a consequence the initial angle is $\sin \theta_i = \frac{a+c}{b-c} \sin(- \theta_f )$ in order for the payload to rest in the ground initially. This is valid for $c<\frac{b-a}{2}$, otherwise the things sits vertically with $\theta_i=\frac{\pi}{2}$.
Doing the dynamics using Newtons's Laws, or Langrange's equations will yield the following acceleration formula
$$ \ddot{\theta} = -\,\frac{c g (M+m) \cos(\theta)}{\frac{m M}{M+m} L^2 + (M+m) c^2} $$
The denominator being the moment of inertia about the pivot. Here is the fun stuff.
The above can be integrated since the right hand side is a function of $\theta$ only with a constant $\alpha$:
$$ \ddot{\theta}=\frac{{\rm d}\dot\theta}{{\rm d}t} =-\alpha \cos(\theta) $$
 $$ \frac{{\rm d}\dot\theta}{{\rm d}\theta} \frac{{\rm d}\theta}{{\rm d}t} = -\alpha \cos(\theta) $$
 $$ \frac{{\rm d}\dot\theta}{{\rm d}\theta} \dot\theta = -\alpha \cos(\theta) $$
 $$ \int \dot\theta {\rm d}\dot\theta =-\int \alpha \cos(\theta) {\rm d}\theta + K$$
 $$ \frac{{\dot \theta}^2}{2} = -\alpha \sin \theta + K $$
with $K$ based on the initial conditions ($\theta=\theta_i$, $\dot\theta=0$)
$$ \dot\theta = \sqrt{2 \alpha (\sin(\theta_i)-\sin(\theta))}$$
and final rotational velocity
$$ \dot\theta_f = \sqrt{2 \alpha (\sin(\theta_i)-\sin(\theta_f))}$$
tangentially the payload launch velocity is
$$ v_{B_f} = (b-c) \dot\theta_f = (b-c) \sqrt{2 \alpha (\sin(\theta_i)-\sin(\theta_f))} $$
with both $\alpha$ and $\theta_i$ depending on the variable $c$.
To optimize we set $ \frac{{\rm d}v_{B_f}}{{\rm d}c}=0 $ which is solved for:
$$ \frac{c}{L} = \frac{\sqrt{m} \left( \sqrt{M+m}-\sqrt{m} \right)}{M+m } $$
For example, a $m=20 {\rm lbs}$ payload, with a $M=400 {\rm lbs}$ counter weight on a $L=20 {\rm ft}$ bar, requires the pivot to be $c=20\;\frac{\sqrt{20} \left( \sqrt{420}-\sqrt{20} \right)}{420 } = 3.412\;{\rm ft} $ from the center of gravity. The c.g. is $a=\frac{20}{420}\,20 = 0.952 {\rm ft}$ from the counterweight.
Edit 1
Based on comments made by the OP the launch velocity is
$$
v_{B_{f}}=\left(\frac{M}{M+m}L-c\right)\sqrt{\frac{2cg(M+m)}{\frac{M}{M+m}L^{2}+(M+m)c^{2}}\left(\sin\theta_{i}-\sin\theta_{f}\right)}
$$
where $g=9.80665\,{\rm m/s}$ is gravity.
With infinite counterweight the maximum launch velocity is $\max(v_{B_{f}})=\sqrt{\frac{2g(L-c)^{2}}{c}}$ so to reach $v_{B_{f}}=6000\,{\rm m/s}$ from earth if $c=1\,{\rm m}$ then $L>1355.8\,{\rm m}$. 
With infinite bar length the maximum launch velocity is $\max(v_{B_{f}})=\sqrt{\frac{2Mcg}{m}}$ so to reach $v_{B_{f}}=6000\,{\rm m/s}$ from earth if $c=1\,{\rm m}$ then $M>18.3\,10^{6}\,{\rm kg}$.
So lets consider $L=2000\,{\rm m}$ and $M=40.0\,10^{6}\,{\rm kg}$ then we choose pivot location at $c=1.500\,{\rm m}$ to get 
$$
v_{B_{f}}=(1999.999-1.5)\sqrt{2\;4.526\left(\sin\theta_{i}-\sin\theta_{f}\right)}
$$
which is solved for $v_{B_{f}}=6000\,{\rm m/s}$ when $\sin\theta_{i}-\sin\theta_{f}=0.9957$
with $\theta_{i}>0$ and $\theta_{f}<0$.
A: These are what I have worked out so far, but I'm not sure they're correct or that I'm using the right way to derive the velocity of the projectile through the torque at the pivot. Other answers would be welcome, in addition to reviewing and correcting any errors I have in these equations/methodology.
Potential Energy
${PE}_{weight} = gm_{weight}*(h_{weight}(\theta_0) - h_{weight}(\theta_{launch}))$
${PE}_{weight} = gm_{weight}(l_{shortArm}cos(\theta_0) - l_{shortArm}cos(\theta_{launch}))$
${PE}_{weight} = gm_{weight}l_{shortArm}(cos(\theta_0) - cos(\theta_{launch}))$
${PE}_{projectile} = gm_{projectile}*(h_{projectile}(\theta_0) + h_{projectile}(\theta_{launch})$
${PE}_{projectile} = gm_{projectile}l_{longArm}(cos(\theta_{launch}) - cos(\theta_0))$
${PE}_{system} = {PE}_{weight} + {PE}_{projectile}$
${PE}_{system} = \small{g(m_{weight}l_{shortArm}(cos(\theta_0) - cos(\theta_{launch})) + m_{projectile}l_{longArm}(cos(\theta_{launch}) - cos(\theta_0))}$
Forces
$Force\;On\;Pivot = {Torque}_{weight} - {Torque}_{projectile}$
$F_{pivot} = \tau_{weight} - \tau_{projectile}$
$F_{pivot} = r(F_{weight}-F_{projectile})sin(\theta)$
$F_{pivot} = g*sin(\theta)(l_{shortArm}m_{weight}-l_{longArm}m_{projectile})$
$Torque\;On\;Projectile = {Torque}_{projectile} = \tau_{projectile} $
$\tau_{projectile} = r * F_{pivot}$
$\tau_{projectile} = l_{longArm}(l_{shortArm}m_{weight}-l_{longArm}m_{projectile})g*sin(\theta)$
Distance
$d_{projectile} = l_{longArm}cos(\theta_0 - \theta_{launch})$
Velocity
$v_{projectile} = \sqrt{v_{initial}^2 + 2a_{projectile}d_{projectile}}$
$v_{projectile} = \sqrt{\frac{2\tau_{projectile}d_{projectile}}{m_{projectile}}}$
$v_{projectile} = \sqrt{\frac{2l_{longArm}(l_{shortArm}m_{weight}-l_{longArm}m_{projectile})g*sin(\theta_0 - \theta_{launch})l_{longArm}cos(\theta_0 - \theta_{launch})}{m_{projectile}}}$
$v_{projectile} = \sqrt{2g*sin(\theta_0 - \theta_{launch})cos(\theta_0 - \theta_{launch})(\frac{l_{longArm}l_{shortArm}m_{weight}}{m_{projectile}} - l_{longArm}^{~3})}$
$v_{projectile} = \sqrt{g*sin(\frac{\theta_0 - \theta_{launch}}{2})(\frac{l_{longArm}l_{shortArm}m_{weight}}{m_{projectile}} - l_{longArm}^{~3})}$
Kinetic Energy
${KE}_{projectile} = \frac{1}{2}m_{projectile}v_{projectile}^{~2} $
${KE}_{projectile} = \frac{1}{2}m_{projectile}(g*sin(\frac{\theta_0 - \theta_{launch}}{2})(\frac{l_{longArm}l_{shortArm}m_{weight}}{m_{projectile}} - l_{longArm}^{~3})) $
${KE}_{projectile} = \frac{g}{2}m_{projectile}sin(\frac{\theta_0 - \theta_{launch}}{2})(\frac{l_{longArm}l_{shortArm}m_{weight}}{m_{projectile}} - l_{longArm}^{~3}) $
${KE}_{projectile} = \frac{g}{2}sin(\frac{\theta_0 - \theta_{launch}}{2})(l_{longArm}l_{shortArm}m_{weight} - l_{longArm}^{~3}m_{projectile}) $
Efficiency
Thus, we can calculate the efficiency of the entire system by:
$Efficiency = \frac{E_{out}}{E_{in}} = \frac{{KE}_{projectile}}{{PE}_{system}}$
$Efficiency = \frac{\frac{g}{2}sin(\frac{\theta_0 - \theta_{launch}}{2})(l_{longArm}l_{shortArm}m_{weight} - l_{longArm}^{~3}m_{projectile})}{g(m_{weight}l_{shortArm}(cos(\theta_0) - cos(\theta_{launch})) + m_{projectile}l_{longArm}(cos(\theta_0) + cos(\theta_{launch}))}$
$Efficiency = \frac{1}{2}\frac{sin(\frac{\theta_0 - \theta_{launch}}{2})(l_{longArm}l_{shortArm}m_{weight} - l_{longArm}^{~3}m_{projectile})}{m_{weight}l_{shortArm}(cos(\theta_0) - cos(\theta_{launch})) + m_{projectile}l_{longArm}(cos(\theta_0) + cos(\theta_{launch}))}$
