User:Guy vandegrift/Euler summation formula

euler summation formula
https://en.wikipedia.org/w/index.php?title=Euler%E2%80%93Maclaurin_formula&oldid=626918816

In the end, we get the following simple formula :


 * $$ 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 $$ x_0 $$ to $$ x_N $$. This is just the trapezoid rule with correction terms.

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.

Ballistic pendulum theory

 * See Ballistic pendulum

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.

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)