CSC 210
Week 9
Topics:
Assignment:
- Online course survey: Please fill out the
online survey for our course so we can make it a better one in the future.
Thanks.
SURVEY LINK
- Modify the newtonFor.R file above so that
newtonForSqrtA = function(A, x, final)
computes the square root of A, with a starting value of x, and final
number of iterates.
- Write a function eulerPendulum=function(g, L, x1, x2, h, steps)
to compute the solution of the pedulum without friction with
g=gravitational constant, L=length, x1=initial position, x2=initial velocity,
h=step size, steps=numer of Euler steps. Now, use your function
to compute eulerPendulum(1, 1, 0, 1.1, 0.1, 5).
Validate your numbers against the ones you obtain from PHASER.
- Heating of a probe: A student held a temperature probe
between her two fingers and recorded the following temperatures every 2 seconds:
Time Temp
00 32.78
02 33.12
04 33.37
06 33.54
08 33.68
10 33.78
12 33.85
14 33.93
16 33.98
18 34.03
20 34.05
- Plot the temps as a function of time. Is the temp leveling off? Why?
- Plot the numerical approximation of the derivative
from the data vs the temperature. Notice that this graph looks
almost linear. Now compute the least squares fit line
to this graph and determine the equation of the line.
- What is the differential equation and the initial
condition governing this experiment?
Put this differenatial equation into Phaser and plot the solution.
Does the Phaser plot resemble the experimental data?