PHYS 481 Quiz 2: ODE Solving + Regression/Machine
Learning (Qs & As)
For an nth order ODE, how many conditions do we need? Right Ans - n
In an IVP, what conditions are we given? Right Ans - y(0), y'(0) i.e. we
know the derivative and function at the same point
General problem solving process for IVPs: Right Ans - 1. Reduce the nth
order ODE into n coupled 1st order ODEs, 2. solve the coupled 1st order ODEs
using a method like explicit Euler, midpoint, or RK4
Briefly explain the explicit Euler method Right Ans - Advance the solution
[S(t_j+1)] by updating the original point [S(t_j)] with the derivative at that
point times the spacing between points [h*dS(t_j)/dt]. Good for first order
Briefly explain the midpoint method Right Ans - Predict the state at the
midpoint using explicit Euler, and then update the solution using the
derivative at the midpoint
Briefly explain the RK4 method Right Ans - Advances the solution using a
weighted average of the derivative calculated at 4 points
In a BVP, what conditions are we given? Right Ans - We know y or y', but at
two different points (i.e. y(0) = a and y(10) = b [Dirichlet condition], y'(0) = a'
and y'(10) = b' [Neumann condition])
Briefly explain the Shooting Method for BVPs Right Ans - Guess an initial
condition to go with the condition you already have, solve the ODE as an IVP
to find the derivative and function at the endpoint, and iterate the initial guess
until the endpoint is the desired value
Specify what the Bisection means when we refer to the Shooting Method
Right Ans - find two guesses that have final values that bound the final value,
try the value halfway between these and find its output (so now we now
whether to use the bottom half or top half of the interval), and repeat, halving
the interval with each iteration until we find a final value that agrees (to
within a specified error) with the desired value
, Provide two advantages of the Shooting method Right Ans - requires
minimal memory (only need to store the output values), works well with
second order nonlinear ODEs (common in physics)
Provide three disadvantages of the Shooting method Right Ans - iterative
(i.e. it's only precise after we iterate many times), the solution we have for the
IVP could accumulate error, hard to generalize to PDEs
Briefly explain the Finite Difference method for BVPs Right Ans - We need
to construct the differential equation at a set of grid points using finite
difference (ex: a 3-point stencil). This gives us a large matrix to solve (i.e. Ay =
b, A is the coefficient matrix, y is our y values which we're looking to solve for,
b is the answer for the DE
Provide two advantages of the Finite Difference method Right Ans - non-
iterative (exact solution), generalizable to PDEs and high order ODEs
Provide two disadvantages of the Finite Difference method Right Ans - we
have an nxn matrix --> very memory intensive, if we have a nonlinear ODE the
solution can be intractable
A major pitfall of the finite difference method is that it's very memory
intensive. Name a way that we can solve this issue Right Ans - Use a
"sparse" (or "iterative") method, which only stores the non-zero matrix
elements
In a regression analysis, we try to find a relation between an independent
variable and a dependent variable. What could an equation describing this
look like? Right Ans - Y = f(X) + e, want to estimate f (here e = random error
with mean zero)
Note two assumptions that are generally made in a regression analysis
Right Ans - Assume that Y depends on X, and that all error is in Y (no error in
X)
In a regression analysis, why might we want to estimate f(X)? Right Ans -
Can use f(X) to predict other values, or to infer information about the system
Learning (Qs & As)
For an nth order ODE, how many conditions do we need? Right Ans - n
In an IVP, what conditions are we given? Right Ans - y(0), y'(0) i.e. we
know the derivative and function at the same point
General problem solving process for IVPs: Right Ans - 1. Reduce the nth
order ODE into n coupled 1st order ODEs, 2. solve the coupled 1st order ODEs
using a method like explicit Euler, midpoint, or RK4
Briefly explain the explicit Euler method Right Ans - Advance the solution
[S(t_j+1)] by updating the original point [S(t_j)] with the derivative at that
point times the spacing between points [h*dS(t_j)/dt]. Good for first order
Briefly explain the midpoint method Right Ans - Predict the state at the
midpoint using explicit Euler, and then update the solution using the
derivative at the midpoint
Briefly explain the RK4 method Right Ans - Advances the solution using a
weighted average of the derivative calculated at 4 points
In a BVP, what conditions are we given? Right Ans - We know y or y', but at
two different points (i.e. y(0) = a and y(10) = b [Dirichlet condition], y'(0) = a'
and y'(10) = b' [Neumann condition])
Briefly explain the Shooting Method for BVPs Right Ans - Guess an initial
condition to go with the condition you already have, solve the ODE as an IVP
to find the derivative and function at the endpoint, and iterate the initial guess
until the endpoint is the desired value
Specify what the Bisection means when we refer to the Shooting Method
Right Ans - find two guesses that have final values that bound the final value,
try the value halfway between these and find its output (so now we now
whether to use the bottom half or top half of the interval), and repeat, halving
the interval with each iteration until we find a final value that agrees (to
within a specified error) with the desired value
, Provide two advantages of the Shooting method Right Ans - requires
minimal memory (only need to store the output values), works well with
second order nonlinear ODEs (common in physics)
Provide three disadvantages of the Shooting method Right Ans - iterative
(i.e. it's only precise after we iterate many times), the solution we have for the
IVP could accumulate error, hard to generalize to PDEs
Briefly explain the Finite Difference method for BVPs Right Ans - We need
to construct the differential equation at a set of grid points using finite
difference (ex: a 3-point stencil). This gives us a large matrix to solve (i.e. Ay =
b, A is the coefficient matrix, y is our y values which we're looking to solve for,
b is the answer for the DE
Provide two advantages of the Finite Difference method Right Ans - non-
iterative (exact solution), generalizable to PDEs and high order ODEs
Provide two disadvantages of the Finite Difference method Right Ans - we
have an nxn matrix --> very memory intensive, if we have a nonlinear ODE the
solution can be intractable
A major pitfall of the finite difference method is that it's very memory
intensive. Name a way that we can solve this issue Right Ans - Use a
"sparse" (or "iterative") method, which only stores the non-zero matrix
elements
In a regression analysis, we try to find a relation between an independent
variable and a dependent variable. What could an equation describing this
look like? Right Ans - Y = f(X) + e, want to estimate f (here e = random error
with mean zero)
Note two assumptions that are generally made in a regression analysis
Right Ans - Assume that Y depends on X, and that all error is in Y (no error in
X)
In a regression analysis, why might we want to estimate f(X)? Right Ans -
Can use f(X) to predict other values, or to infer information about the system