L. 1.9, Anikushina

Analytics

expression_g: 4*(%pi)^2 * ((1/12)*'l^2 + 'a^2) / ('a * 'Te^2);

expression_err_g: ratsimp((abs(diff(expression_g, 'a)/expression_g))*'Dl)
   + ratsimp((abs(diff(expression_g, 'Te)/expression_g/'Nosc))*'Dt)
   + ratsimp((abs(diff(expression_g, 'l)/expression_g))*'Dl);

Calculations

fpprintprec: 3$

Units

meter:1$
s:1$
kg:1$
g:9.81*meter/s^2$
cm:meter/100$

Constant data

   l: 149*cm$
  Dl: 0.5*cm$
  Dt: 0.2*s$
Nosc: 40$

Functions

f_Te(t):=t/''Nosc$
f_Tt(g,a):=2 * %pi *((1/12*''l^2+a^2)/(g*a))^0.5$
f_g(a,Te):= ''expression_g$
f_err_g(a,Te):= ''expression_err_g$

Experimental data

Number of measurements

Nmeas: 16$

s1: zeromatrix(Nmeas,6)$

 s1[1]:[8*cm,  133*s, 0, 0, 0, 0]$
 s1[2]:[12*cm, 110*s, 0, 0, 0, 0]$
 s1[3]:[16*cm, 98.5*s, 0, 0, 0, 0]$
 s1[4]:[20*cm, 90.5*s, 0, 0, 0, 0]$
 s1[5]:[24*cm, 82.5*s, 0, 0, 0, 0]$
 s1[6]:[28*cm, 82*s, 0, 0, 0, 0]$
 s1[7]:[32*cm, 80*s, 0, 0, 0, 0]$
 s1[8]:[36*cm, 78.5*s, 0, 0, 0, 0]$
 s1[9]:[40*cm, 77.5*s, 0, 0, 0, 0]$
s1[10]:[44*cm, 77.5*s, 0, 0, 0, 0]$
s1[11]:[48*cm, 77.5*s, 0, 0, 0, 0]$ 
s1[12]:[52*cm, 77.5*s, 0, 0, 0, 0]$ 
s1[13]:[56*cm, 78*s, 0, 0, 0, 0]$ 
s1[14]:[60*cm, 79*s, 0, 0, 0, 0]$ 
s1[15]:[64*cm, 79*s, 0, 0, 0, 0]$ 
s1[16]:[68*cm, 80*s, 0, 0, 0, 0]$ 
for i thru Nmeas do (
 s1[i][3]: f_Te(s1[i][2]),
 s1[i][4]: f_Tt(''g, s1[i][1]),
 s1[i][5]: f_g(s1[i][1], s1[i][3]),
 s1[i][6]: f_err_g(s1[i][1], s1[i][3])
);

a, t, Te, Tt, g, err_g

float(s1);

submatrix(s1,2,4,5)$
data1:maplist(copy,%)$

Here we change realative errors to absolute errors in data1

for i thru Nmeas do (data1[i][3]:data1[i][2] * data1[i][3]);

Experimental value of g

T_vs_a:submatrix(s1,2,4,5)$
lsquares_estimates(T_vs_a,['x,y], y=f_Tt(ggg, 'x),[ggg])$
g_exp:ggg,%$ float(g_exp);

wxdraw2d(
xlabel="a, m",
ylabel="T, s",
xaxis=true,
xaxis_type=dots/*solid*/,
grid=true,
color=red,
key="Experimental",
explicit(f_Tt(''g_exp,'a),'a,0.1,0.7),
color=green, key="Theoretical",
explicit(f_Tt(''g,'a),'a,0.1,0.7),
color=blue,
key="Experimental",
errors(data1))$

Function 'set_draw_defaults' may be used to set default
values for wxdraw2d.