# User:Guy vandegrift/Current project

## euler summation formula

In the end, we get the following simple formula ([1]):

${\displaystyle I=\int _{x_{0}}^{x_{N}}f(x)\,dx=h({\frac {f_{0}}{2}}+f_{1}+f_{2}...+f_{N-1}+{\frac {f_{N}}{2}})+{\frac {h^{2}}{12}}[f'_{0}-f'_{N}]-{\frac {h^{4}}{720}}[f'''_{0}-f'''_{N}]+...}$.

Where 'N' is the number of points in the interval of integration, from ${\displaystyle x_{0}}$ to ${\displaystyle x_{N}}$.

This is just the trapezoid rule with correction terms ([2]).

## Ballistic pendulum lab

In this lab we shall investigate the ballistic pendulum by taking measurements and using a computer program to analyze the results. The formulas used in this analysis will be developed from first principles (Newton's laws).

### Ballistic pendulum device

Make a hand drawn sketch of the ballistic pendulum and label the important parts. For now we shall use the following names:

• The 'cannonball' is a small ball of mass m
• The 'cannon' shoots the 'cannonball' using a spring mechanism that is attached to the cannon rod
• The 'target' is a device that captures the cannonball. It has mass M (which includes a portion of the attached aluminum rod in a way that only calculus students could understand).
• The 'cart' is the name we shall use for the combined 'cannonball' and 'target'. It has has mass '(m+M)'
• The 'ramp' is not a physical component but the path taken by the 'cart' as it moves
• The 'rachet' is the device that catches the cart at a final height.

All heights are measured from the center of the cannonball as it leaves the cannon rod.

### Computer code

% This tests the pre hml option
% it should be two lines

• Write instructions for opening MATLAB on a campus computer, pasting and running this code.
MatLab code
clear all;clc;close all;
x='hello'
% ball mass was 68.5 grams
% mass of thing with rod was 275.6 g
% use cgs units
g=980;%cm/s/s
m=68.5;
M=275.6;
h_big=16.3;
h_small=9;
h=h_big-h_small;
v_1=sqrt(2*g*h)%119.6161cm/s This is the speed of the ball and receiver put
% together when they were at the bottom
% (m+M)*v_1 = m*v_0  (we want v_0)
v_0=v_1*(m+M)/m %muzzle speed of cannon
R_observed=211.5%cm range
theta=asin(12/40.5);%
% the formula for range is d = 2v_0^2*sin(theta)/g
R_calc = 2*v_0^2*sin(theta)/g

bigoversmall=R_calc/R_observed

display('How high does the cannon shoot?')
height=    v_0^2   /   (2*g)


## References

1. DEVRIES, Paul L. ; HASBUN, Javier E. A first course in computational physics. Second edition. Jones and Bartlett Publishers: 2011,p.156)
2. DEVRIES, Paul L. ; HASBUN, Javier E. A first course in computational physics. Second edition. Jones and Bartlett Publishers: 2011,p.156)