{{{id=159|
%auto
reset()
forget()
///
}}}
{{{id=369|
f(y) = 2 * sqrt((2-y)*y)
ay = []
ai = []
n = 400
for i in range(n+1):
y = i*2/n
ai += [y]
ay += [f(y)]
p = list_plot(zip(ay,ai),figsize=(2.5,4),axes_labels=['Width (w)','Height (y)'],plotjoined=True)
p += text('$w = 2\ \sqrt{(2-y)y}$',(1,1),fontsize=12,color='black')
save(p,'/netbackup/data/Network/arachnoid/TankCalc/volumes_resources/cylindrical_tank_equation_plot.png')
show(p)
///
}}}
{{{id=371|
forget()
var('y,z')
assume(y > 0)
fi(y) = integrate(f(z),(z,0,y))
show(f(y))
show(fi(y))
///
}}}
{{{id=378|
# bucket (conical frustum) equation
var('r_a,r_b,h_b,h_c')
show(latex(1/3 * pi * (r_b^2 * h_c - r_a^2 * (h_c-h_b))))
h_c = h_b * r_b / (r_b-r_a)
vv = 1/3 * pi * r_b^2 * h_c - 1/3 * pi * r_a^2 * (h_c-h_b)
bv(h_b,r_b,r_a) = vv
show(bv(h_b,r_b,r_a))
show(latex(bv(h_b,r_b,r_a)))
latex(vv)
vvfs = vv.full_simplify()
show(vvfs)
latex(vvfs)
///