23OPTIMIZATION
In the previous chapter, we developed a model of the flight of a baseball, including gravity and a simple version of drag, but neglecting spin, Magnus force, and the dependence of the coefficient of drag on velocity.
In this chapter, we’ll apply that model to an optimization problem. In general, optimization is a process for improving a design by searching for the parameters that maximize a benefit or minimize a cost. For example, in this chapter we’ll find the angle you should hit a baseball to maximize the distance it travels. And we’ll use a new function called maximize_scalar that searches for this angle efficiently.
This chapter ...
Get Modeling and Simulation in Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.