Protected: Linear Algebra, Section 5.4

This content is password protected. To view it please enter your password below:

Posted in Linear Algebra 2020, Uncategorized

Protected: Linear Algebra, Section 5.3

This content is password protected. To view it please enter your password below:

Posted in Uncategorized

Protected: Calculus 3, Section 4.5

This content is password protected. To view it please enter your password below:

Posted in Spring 2020 Calculus 3, Uncategorized

Protected: Calculus 3: Preparing for Exam 2

This content is password protected. To view it please enter your password below:

Posted in Spring 2020 Calculus 3, Uncategorized

Protected: Linear Algebra, Section 5.1

This content is password protected. To view it please enter your password below:

Posted in Linear Algebra 2020, Uncategorized

Protected: Linear Algebra, Section 5.2

This content is password protected. To view it please enter your password below:

Posted in Linear Algebra 2020, Uncategorized

Protected: Calculus 3, Section 4.4

This content is password protected. To view it please enter your password below:

Posted in Spring 2020 Calculus 3

Protected: Spring 2020 Calculus 3, Section 4.3

This content is password protected. To view it please enter your password below:

Posted in Spring 2020 Calculus 3

Visualizing coordinate transformations

Here is some sage code to help you visualize coordinate transformations. I give three examples:

Polar coordinates:

# polar coordinates
var('u','v')

X(u,v) = v*cos(u)
Y(u,v) = v*sin(u)

# create plots where v is fixed and u ranges
uplot = parametric_plot( (X(u,0),Y(u,0)), (u,-pi,pi))
for k in [0..4]:
    uplot = uplot+parametric_plot( (X(u,k),Y(u,k)), (u,-pi,pi))

# create plots where u is fixed and v ranges
vplot = parametric_plot( (X(0,v),Y(0,v)), (v,0,4))
for k in [-10..10]:
    vplot = vplot+parametric_plot( (X(k*pi/10,v),Y(k*pi/10,v)), (v,0,4.5), color = "red")

# plot all the plots
mainplot = uplot + vplot
mainplot.show(xmin=-5, xmax=5, ymin=-5, ymax =5, axes_labels = ["$x$","$y$"])

Hyperbolic coordinates:

# hyperboloidal coordinates
var('u','v')

X(u,v) = v*cosh(u)
Y(u,v) = v*sinh(u)

uplot = parametric_plot( (X(u,0),Y(u,0)), (u,-2,2))
for k in [0..4]:
    uplot = uplot+parametric_plot( (X(u,k),Y(u,k)), (u,-2,2))

vplot = parametric_plot( (X(0,v),Y(0,v)), (v,0,4))
for k in [-5..5]:
    vplot = vplot+parametric_plot( (X(k*.2,v),Y(k*.2,v)), (v,0,4), color = "red")

mainplot = uplot + vplot
mainplot.show(xmin=-5, xmax=5, ymin=-5, ymax =5, axes_labels = ["$x$","$y$"])

One more fun example:

# crazy example coordinates
var('u','v')

X(u,v) = u^2 - v^2
Y(u,v) = 2*u*v

# create plots where v is fixed and u ranges
uplot = parametric_plot( (X(u,0),Y(u,0)), (u,0,4))
for k in [-4..4]:
    uplot = uplot+parametric_plot( (X(u,k),Y(u,k)), (u,0,4))

# create plots where u is fixed and v ranges
vplot = parametric_plot( (X(0,v),Y(0,v)), (v,0,4))
for k in [0..10]:
    vplot = vplot+parametric_plot( (X(k,v),Y(k,v)), (v,-4,4), color = "red")

# plot all the plots
max = 20
mainplot = uplot + vplot
mainplot.show(xmin=-max, xmax=max, ymin=-max, ymax =max, axes_labels = ["$x$","$y$"])<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;">&#65279;</span>
Posted in Calculus 3, Sage | Leave a comment

Sage code for trigonometric forcing

var('t')

omegaf = 3
limit=130

A(t) = 1-(1/(4-omegaf^2))*cos((omegaf-2)*t)
h(t) = cos(2*t)

AmpPlot = plot(A(t), (t,0,limit),linestyle='dashed', color='red',thickness=2)
hPlot = plot(h(t)*A(t), (t,0,limit))

mainPlot = AmpPlot+ hPlot
mainPlot.show(ymin = -5,ymax = 5, axes_labels=['$t$',' '],ticks = [[],[]])<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>
Posted in Differential equations, Sage, Uncategorized | Leave a comment