Quiz: Solve ODEs with Python


1. The ODEINT function requires a user defined function that includes time (t) and the current system states (y). What is the correct definition of the function named myFunction?

A. def myFunction(t,y):
Incorrect.
B. y,t = myFunction()
Incorrect.
C. def myFunction(y,t):
Correct.
D. def myFunction([t,y]):
Incorrect.

2. The current time (t) and system states (y) are required as arguments to a custom function for ODEINT in Python. What is returned from the custom function? See ODEINT tutorials for additional help.

A. The solution at the next time point: y[k+1]
Incorrect. The function returns the derivatives at the current time and state values, not the solution.
B. A list or array of the differential equation derivatives: dy/dt
Correct. The user-defined function returns the derivatives at the requested time and state values.
C. The time and the solution state values: t, y
Incorrect. Those are the inputs to the function.

3. ODEINT can simultaneously solve coupled differential equations?

A. True
Correct. ODEINT can solve many coupled differential equations, but solution time increases more with >1000 equations.
B. False
Incorrect. Numerical solutions are often possible with many coupled differential equations.