CSC 210
Week 9
Topics:
Assignment:
- Beetle model: Download the R file beetle.R above and
run (source) it. Read out the parameter values of a and b
for the logistic differential equation y' = ax + bx^2.
Now, use these parameter values in the Cubic1D ODE differential
equation in Phaser, with the appropriate initial condition, and
print out the Xi values for 14 days. How do these numerical
values compare with the original data values?
- Energy conserved:
The Energy of planar pendulum without friction is given by the function
E(Θ , Θ') = (1/2)m(L^2)(Θ'^2) + mgL(1- cos(Θ)).
This Energy function is supposed to be conserved along
the solutions of the pendulum. Show this assertion by computing
dE/dt using the chain rule, keeping in mind that Θ and
Θ' depend on t, and the differential equations for pendulum.
Observe that dE/dt = 0, so it must be constant function of t.
-
Free energy from EULER:
Now, in the pendulum equation, take c= 0, m=1, l=1, g=1, the initial
conditions Θ=0.5 and Θ'=0
and compute the solution for 20 time units using Euler's algorithm
with step size of h=0.1. On the Time Panel of Phaser's
Numerics Editor set "Skip iterations per plot" to 9
so that in the Xi Values view you will get the solution
tabulated at integer values of time: you should have 21 rows
of numbers.
Now, with R, use these position and velocity numbers in the formula
for the Energy of the pendulum above so that you will have
21 values of the Energy function. Plot these Energy
values as a function of time. Are these Energy values
constant? Increasing? Decreasing?
- 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.14
04 33.38
06 33.55
08 33.68
10 33.78
12 33.85
14 33.93
16 33.98
18 34.03
20 34.06
- 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 differential equation into Phaser and plot the solution.
Does the Phaser plot resemble the experimental data?
- Hint: For this problem, modify the beetle.R program above.