That is beyond the scope of these courses, but there are lots of other webpages that cover the calculus behind all this. Here’s a thread with pointers to get you started on that. I got that link from one of the topics on the DLS FAQ thread, which is worth a look just on general principles if you haven’t already seen it.