So I was going through an ODEs textbook and in a section discussing physical problems, decided that it would be interesting to come up with the equations of motion using Lagrangian mechanics for the examples they posted. For the first example, a falling rock, this easily worked. The second example was a falling object with air resistance. The equation they came up with was ma + kv = mg (I'd use dot notation but I'm unsure how to do it on here) which makes perfect sense; my issue was that I couldn't think of how the air resistance would affect either the kinetic or potential energies. So I pose the question: how would air resistance affect the kinetic or potential energy and what would their equations look like, such that the Lagrangian method would yield the above equation of motion?