PREVIOUS: Programming tools
UP: Course Outline
NEXT: Modeling Particle Motion
3. Analytical Tools
In-class exercise #2
C++
and
Python
solutions to part (a)
C++
and
Python
solutions to part (b)
Using
cerr
as a secondary output stream in C++.
Using
functions
to simplify tasks
Finding roots of numerical functions
Using
linear interpolation
to refine simple estimates (simple
C
and
Python
functions)
Examples in
C++
and
Python
In-class Exercise 3.1
C++
and
Python
solutions to part (a)
C++
and
Python
solutions to part (b)
Finding maxima and minima of numerical data
C++
and
Python
examples
In-class exercise 3.2:
Find the first maximum with
t > 0
of the function
x(t)
defined in Exercise 3.1.
C++
and
Python
solutions
Using
quadratic interpolation
to refine the estimate of a maximum or minimum.
Examples in
C++
and
Python
Numerical integration and differentiation
C++ functions referenced:
FunctionOnGrid.cpp
Trapezoid.cpp
Simpson.cpp
Derivative.cpp
Simple Python programs for
integration
and
differentiation
In-class Exercise 3.3
Homework #2