Welcome to the site. More to come.
In the meantime, here is an interactive ODE solver. Drag the red point to set the initial condition; the solver integrates forward (blue) and backward (red) from there. The current \((t, y)\) coordinates show in the chart title.
\[\frac{dy}{dt} = \frac{1}{2}y^2 - 5t^2 + 1\]
import%20marimo%20as%20mo%0Aimport%20matplotlib.pyplot%20as%20plt%0Aimport%20numpy%20as%20np%0Afrom%20scipy.integrate%20import%20solve_ivp%0Afrom%20wigglystuff.chart_puck%20import%20ChartPuck
def%20ode_rhs(t%2C%20y)%3A%0A%20%20%20%20%22%22%22dy%2Fdt%20%3D%200.5%20y%5E2%20-%205%20t%5E2%20%2B%201.%22%22%22%0A%20%20%20%20return%20np.array(%5B0.5%20*%20y**2%20-%205%20*%20t**2%20%2B%201%5D)
X_MIN%2C%20X_MAX%20%3D%20-3%2C%203%0AY_MIN%2C%20Y_MAX%20%3D%20-10%2C%2010%0A%0A%0Adef%20draw_ode_soln(ax%2C%20widget)%3A%0A%20%20%20%20x%2C%20y%20%3D%20widget.x%5B0%5D%2C%20widget.y%5B0%5D%0A%0A%20%20%20%20%23%20Direction%20field%20%E2%80%94%20quiver%20normalized%20for%20uniform%20arrow%20length.%0A%20%20%20%20t_grid%20%3D%20np.linspace(X_MIN%2C%20X_MAX%2C%2022)%0A%20%20%20%20y_grid%20%3D%20np.linspace(Y_MIN%2C%20Y_MAX%2C%2022)%0A%20%20%20%20T%2C%20Y%20%3D%20np.meshgrid(t_grid%2C%20y_grid)%0A%20%20%20%20dT%20%3D%20np.ones_like(T)%0A%20%20%20%20dY%20%3D%20ode_rhs(T%2C%20Y).squeeze()%0A%20%20%20%20speed%20%3D%20np.sqrt(dT**2%20%2B%20dY**2)%0A%20%20%20%20ax.quiver(%0A%20%20%20%20%20%20%20%20T%2C%20Y%2C%20dT%20%2F%20speed%2C%20dY%20%2F%20speed%2C%20speed%2C%0A%20%20%20%20%20%20%20%20cmap%3D%22coolwarm%22%2C%20alpha%3D0.45%2C%20scale%3D30%2C%20width%3D0.003%2C%0A%20%20%20%20)%0A%0A%20%20%20%20%23%20Forward%20and%20backward%20solutions%20from%20the%20chosen%20initial%20point.%0A%20%20%20%20sol_fwd%20%3D%20solve_ivp(ode_rhs%2C%20(x%2C%20X_MAX)%2C%20%5By%5D%2C%20dense_output%3DTrue%2C%20max_step%3D0.05)%0A%20%20%20%20t_fwd%20%3D%20np.linspace(x%2C%20X_MAX%2C%20300)%0A%20%20%20%20ax.plot(t_fwd%2C%20sol_fwd.sol(t_fwd)%5B0%5D%2C%20color%3D%22%231E3A5F%22%2C%20linewidth%3D2.5%2C%20label%3D%22Forward%22%2C%20zorder%3D3)%0A%0A%20%20%20%20sol_bwd%20%3D%20solve_ivp(ode_rhs%2C%20(x%2C%20X_MIN)%2C%20%5By%5D%2C%20dense_output%3DTrue%2C%20max_step%3D0.05)%0A%20%20%20%20t_bwd%20%3D%20np.linspace(x%2C%20X_MIN%2C%20300)%0A%20%20%20%20ax.plot(t_bwd%2C%20sol_bwd.sol(t_bwd)%5B0%5D%2C%20color%3D%22%239F1239%22%2C%20linewidth%3D2.5%2C%20label%3D%22Backward%22%2C%20zorder%3D3)%0A%0A%20%20%20%20ax.set_title(f%22Initial%3A%20(%7Bx%3A.2f%7D%2C%20%7By%3A.2f%7D)%22)%0A%20%20%20%20ax.set_xlim(X_MIN%2C%20X_MAX)%0A%20%20%20%20ax.set_ylim(Y_MIN%2C%20Y_MAX)%0A%20%20%20%20ax.set_xlabel(%22t%22)%0A%20%20%20%20ax.set_ylabel(%22y%22)%0A%20%20%20%20ax.legend(loc%3D%22upper%20left%22%2C%20fontsize%3D8)%0A%20%20%20%20ax.grid(True%2C%20alpha%3D0.3)%0A%20%20%20%20ax.figure.tight_layout()
puck%20%3D%20ChartPuck.from_callback(%0A%20%20%20%20draw_fn%3Ddraw_ode_soln%2C%0A%20%20%20%20x_bounds%3D(-3%2C%203)%2C%0A%20%20%20%20y_bounds%3D(-5%2C%205)%2C%0A%20%20%20%20figsize%3D(7%2C%204.5)%2C%0A%20%20%20%20x%3D0%2C%0A%20%20%20%20y%3D0%2C%0A%20%20%20%20puck_color%3D%22%239F1239%22%2C%0A%20%20%20%20puck_radius%3D5%2C%0A%20%20%20%20throttle%3D10%2C%0A)%0Amo.ui.anywidget(puck)