def integrate_ivp(u0=<NUM_LIT:1.0>, v0=<NUM_LIT:0.0>, mu=<NUM_LIT:1.0>, tend=<NUM_LIT>, dt0=<NUM_LIT>, nt=<NUM_LIT:0>,<EOL>nsteps=<NUM_LIT>, t0=<NUM_LIT:0.0>, atol=<NUM_LIT>, rtol=<NUM_LIT>, plot=False,<EOL>savefig='<STR_LIT:None>', method='<STR_LIT>', dpi=<NUM_LIT:100>, verbose=False):
f, j = get_f_and_j(mu)<EOL>if nt > <NUM_LIT:1>:<EOL><INDENT>tout = np.linspace(t0, tend, nt)<EOL>yout, nfo = integrate_predefined(<EOL>f, j, [u0, v0], tout, dt0, atol, rtol, nsteps=nsteps,<EOL>check_indexing=False, method=method)<EOL><DEDENT>else:<EOL><INDENT>tout, yout, nfo = integrate_adaptive(<EOL>f, j, [u0, v0], t0, tend, dt0, atol, rtol, nsteps=nsteps,<EOL>check_indexing=False, method=method)  <EOL><DEDENT>if verbose:<EOL><INDENT>print(nfo)<EOL><DEDENT>if plot:<EOL><INDENT>import matplotlib.pyplot as plt<EOL>plt.plot(tout, yout[:, <NUM_LIT:1>], '<STR_LIT>')<EOL>plt.plot(tout, yout[:, <NUM_LIT:0>], '<STR_LIT>', linewidth=<NUM_LIT:2>)<EOL>if savefig == '<STR_LIT:None>':<EOL><INDENT>plt.show()<EOL><DEDENT>else:<EOL><INDENT>plt.savefig(savefig, dpi=dpi)<EOL><DEDENT><DEDENT>
Example program integrating an IVP problem of van der Pol oscillator