Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168695
Image: ubuntu2004

Inverse exponential sinusoidal "squishing"

By Justin Drawbert

var('t a b') @interact def _(t_min=(-1,0), t_max=(1e-10,2), a=(0.01,5), b=(0,2)): p1 = plot(exp(-a*t)*sin(2*pi*t),[t,t_min,t_max],color="blue",legend_label="$x(t)=e^{-at}\sin(2\pi t)$"); p2 = plot(b*sin(2*pi*t),[t,t_min,t_max],color="red",legend_label="$b\,\sin(2\pi t)$"); p3 = plot([diff(exp(-a*t)*sin(2*pi*t),t)],[t,t_min,t_max],color="green") P = p1+p2#+p3 show(P)
#Note uncomment the "+p3" to show derivative of first function var('t a b') @interact def _(t_min=input_box(0), t_max=input_box(1), a=input_box(1), b=input_box(1)): p1 = plot(exp(-a*t)*sin(2*pi*t),[t,t_min,t_max],color="blue",legend_label="$e^{-at}\sin(2\pi t)$"); p2 = plot(b*sin(2*pi*t),[t,t_min,t_max],color="red",legend_label="$b\,\sin(2\pi t)$"); p3 = plot([diff(exp(-a*t)*sin(2*pi*t),t)],[t,t_min,t_max],color="green",legend_label="$d/dt(e^{-at}\sin(2\pi t))$"); P = p1+p2#+p3 show(P)
t_min 
t_max 
[removed]
[removed]
[removed]
[removed]
diff(exp(-a*t)*sin(2*pi*t),t)
2*pi*e^(-a*t)*cos(2*pi*t) - a*e^(-a*t)*sin(2*pi*t)