Determining the percentage area of the moon's disk shaded with respect to time
If I interpret your question correctly, you want to calculate the area of the moon disk as seen from Earth which is shaded, correct? You might then be looking for a way to calculate the position of the moon's terminator line. For this, you might have to dive into celestrial mechanics, more specifically about the ephemerides of moon and Earth. This is necessary as you  have to calculate the position of Earth and moon in an appropriate sun-centered coordinate system.
In a basic course on celestial mechanics this does not necessarily occur since the priority there is to calculate the stability of the orbit of objects.
Related questions and answers

Get a table of Moon phase angle per day
How to calculate the moon phase angle?

References

Klaus Hempe, Jürgen Molt: Sterne im Computer. Berechnungsprogramme für den Hobby- Astronomen (1999). IMHO an accessible explanation of the numerics, but in German.

http://www.internetsv.info/MoonCalc.html seems helpful.

Wolframalpha's moon phase calculation always give you the illuminated percentage of the moon disk.