


Presenters
2PM
- 4.10 - Trent
- 4.11 - Max
- 4.12 - Megan
- 4.16 -
- 4.17 -
- 4.18 -
- 4.19 -
- 4.20 -
- We are in the 8th week of the semester. If you are on track for an A, then ideally you'll be finishing your third SDL project. Look for ideas this week in the 4th unit to propose a fourth. Completing one every 2 weeks takes about 2-3 hours a week of time.
- You may complete at most one SDL project per week for credit. Account for this in your planning.
Brain Gains (Rapid Recall)

- Let $f(x,y)=ax+by$ and $\vec r(t) = (ct+d, et+f)$. Compute $\frac{df}{dt}$.
Solution
Two options:
- Substitute, so $f(\vec r(t)) = a(ct+d)+b(et+f)$, and then differentiate.
- Compute differentials, so $df=adx+bdy$, $dx=cdt$, and $dy=edt$, and then substitute.
Either way, we end up with $$\dfrac{df}{dt} = ac+be.$$ Symbolically, we have $$\frac{df}{dt} = \underbrace{a}_{f_x}\underbrace{c}_{\frac{dx}{dt}}+\underbrace{b}_{f_y}\underbrace{e}_{\frac{dy}{dt}} = f_x\frac{dx}{dt}+f_y\frac{dy}{dt}. $$ We call this the chain rule.
- For the function $f(x,y) = 4x^2y+y^3$, compute $f_x$ and $\ds\frac{\partial f}{\partial y}$.
Solution
We have
- $f_x = 8xy +0 $, and
- $\frac{\partial f}{\partial y} = 4x^2(1)+3y^2$.
- For the function $f(x,y) = 4x^2y+y^3$, compute $\ds\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right)$.
Solution
Since we know $\frac{\partial f}{\partial y} = 4x^2(1)+3y^2$, then we have $$\ds\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right) =\ds\frac{\partial}{\partial x}\left(4x^2(1)+3y^2\right) =8x. $$ We call the above the second partial derivative of f, first with respect to $y$, and then with respect to $x$. You'll see it appear in the homework very soon. For this function $f(x,y)$, there are four total second partial derivatives of $f$, namely $$ f_{xx}=\ds\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right), \quad f_{xy}=\ds\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right), \quad f_{yx}=\ds\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right), \quad f_{yy}=\ds\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right). $$
- State $a$ and $b$ so that $\vec u=(-8,4,5)$ and $\vec v=(4,a,b)$ lie along the same line.
Solution
- $(4,-2,-\frac{5}{2})$.
- Consider the function $f(x,y)=y-x^2$. On a single $xy$-grid, graph the level curves with heights $0$, $1$, and $-4$. In other words, construct a contour plot that includes the contours 0, 1, -4.
Solution
Your graph should have 3 parabolas, namely $y=x^2$, $y=x^2+1$, and $y=x^2-4$.
- Using the same function $f(x,y)=y-x^2$, construct a 3D surface plot.
Solution
There are several ways to construct this surface plot. When $x$ is held constant, the graph should consist of lines. When $y$ is held constant, the graph consists of parabolas opening downwards (negative $z$). When $z$ is held constant, the graphs are parabolas opening towards larger $y$ values. We'll graph this together in class.
var('x','y','z') #Define your variables f(x,y) = y-x^2 #State the function xbounds = (x,-3,3) ybounds = (y,-3,3) #This gives you a generic contour plot (a plot consisting of several level curves) pcontour=contour_plot(f,(x,-2,2), (y,-2,2),colorbar=True) show(pcontour) #This section allows you to plot as many level curves as you want level_curve_values=[0,1,-4] p=implicit_plot(f(x,y)==level_curve_values[0],xbounds,ybounds) for zlevel in level_curve_values: p+=implicit_plot(f(x,y)==zlevel,xbounds,ybounds) show(p) #Uncomment this section if you want a 3D image of the surface. p3D=plot3d(f,xbounds,ybounds, mesh=True) for zlevel in level_curve_values: p3D+=implicit_plot3d(f(x,y)==zlevel, xbounds,ybounds,(z,zlevel-0.1,zlevel+0.1),thickness=4, color = "red") show(p3D) #This section draws the gradient of your function. gradf = f.diff()(x,y) gradplot=plot_vector_field(gradf,xbounds,ybounds) show(gradplot) #This section combines your level curve plot and your gradient plot. show(p+gradplot)
- If we know $\vec u\cdot \vec v=0$, then what is the angle between $\vec u$ and $\vec v$?
Solution
The vectors are orthogonal. So as long as neither is the zero vector, then the angle is 90 degrees.
Group problems
Here's a link to the Mathematica Notebook ContourSurfaceGradient.nb.
- Consider the function $z=4-y^2$.
- Construct a 2D contour plot by hand. So pick several values for $z$ and plot the resulting curves. If you end up with lots of horizontal lines in the $xy$-plane, you're doing this correctly. Write the height on each horizontal line you draw.
- Construct a 3D surface plot by hand.
- Construct both the above with software.
- Consider the function $f(x,y)=4-|x|$.
- Construct a 2D contour plot. Label your contours with their corresponding height.
- Construct a 3D surface plot.
- Construct both the above with software.
- As a group, open up the the problem set and discuss problem 4.20 together. If you finish 4.20 together, then start on 4.21. The link below will get you a PDF of the problem set.
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |