I know that Fermat had a method of adequality in order to solve certain optimization. One such problem was: "Suppose that you have a rectangle of material and need to cut corners into it such that the folded flaps will make a box. What are the cuts that maximize the volume of the box?"
Were there other "applied" problems that people were trying to solve, which motivated the investigation into optimization and tangent lines more generally?
What I'm really trying to wrap my head around is: Did people study the derivative because it was needed for applications in other fields? Or did they just think the questions about tangent lines were simply interesting, and only researched them out of curiosity? It seems to me like the box optimization problem isn't that important for real applications -- so did Fermat investigate that problem simply because he thought it was an intrinsically interesting puzzle and not for any really practical purpose?
And besides him, what about the other mathematicians who contributed to understanding the derivative? Was there anything about navigating the globe, or firing artillery, or any other thing like that, for which people felt the need to find tangent lines?
Perhaps a helpful related question: Why were the ancient Greeks interested in tangents to conic sections? Again, did the idea just strike them as interesting, or was there some way in which this helps solve applied problems that they were facing at the time?