Yes you read the title of this entry correctly. Mathemagics is the title of a book written by Margaret Ball back in 1996. Its still possible to obtain copies of it but its out of print otherwise I think.

You probably wonder why I'm discussing a fantasy book but there is a point so please hang in with me for a bit longer ok?

This book is preceded by several short stories in the same world. It involves a female sword fighter who lives in another world. She is not a mage because she cannot seem to master the system of magic there. When she tries, accidents happen and she's never sure how to undo the damage.

Yes I can hear you muttering about getting to the point. Here is the point. The magic system in this book is based on calculus. You read that right! Calculus. Every spell is a derivative and every counter spell the antiderivative to the original spell.

As I said earlier, she may not be great at math but a man from our universe who just happens to be a math teacher, ends up in hers. They fall in love and of course they marry but in the process, he ends up a great mage because he can do both derivatives and antiderivatives.

The book takes up when the family living in this world where she is the author of several sword and sorceress books. Her husband teaches Mathematics but when their world is invaded from hers so out comes the spells and they are off.

I found the idea of calculus as the basis of a magic system. Yes I did check each and every spell and counter spell to make sure they were correct and yes they were. In addition, every chapter title is also a mathematical expression such as i^4 for chapter 1 or sqroot 4 for chapter 2.

I loved the book and have reread it numerous times since then and continue to do so because it is funny and the math is so well integrated you don't mind it. Give it a shot and enjoy.