Books Everyone Should Read


Some of the best books I’ve read till now, and think other people should read too…

  1. The Adventures of Tom Sawyer by Mark Twain
  2. Flatland: A Romance of Many Dimensions by Edwin A. Abbott
  3. A Journey to the Center of the Earth by Jules Verne
  4. The Time Machine by H. G Wells
  5. 1984 by George Orwell
  6. The Island of Dr. Moreau by H. G Wells
  7. The Martian by Andy Weir
  8. Contact by Carl Sagan
  9. Animal Farm by George Orwell
  10. What is Man? by Mark Twain
  11. The Adventures of Sherlock Homes by Sir Arthur Conan Doyle [1]
  12. The Big Four by Agatha Christie [2]
  13. A Study in Scarlet by Sir Arthur Conan Doyle
  14. The Valley of Fear by Sir Arthur Conan Doyle
  15. The Hound of Baskervilles by Sir Arthur Conan Doyle
  16. The Sign of Four by Sir Arthur Conan Doyle
  17. And Then There Were None by Agatha Christie
  18. A Brief History of Time by Stephen Hawking
  19. The Grand Design by Stephen Hawking
  20. Dracula by Bram Stoker
  21. A Mathematician’s Apology by G. H. Hardy [3]
  22. Letters to A Young Mathematician by Ian Stewart
  23. The Character of Physical Law by Richard P. Feynman [4]

[1]: Including all the other short story collections Conan Doyle wrote about the fictional detective.

[2]: All the other novels in the Hercule Poirot series by Agatha Christie are awesome too.

[3]: Be sure to get the edition that has the introduction written by C. P. Snow

[4]: I watched the actual lectures instead of reading the book.

Books I regret reading and hate with a vengeance…

  1. All the nonsense written by Jane Austen
  2. All the nonsense written by Louisa May Alcott
  3. All the nonsense written by J. K Rowling
  4. All the nonsense written by Enid Blyton
  5. All the nonsense written by C. S Lewis

Becoming A Theoretical Physicist – Phase 2


One of the biggest challenges I have faced is to keep myself motivated and interested. I try to keep myself involved in ‘sciency’ stuff to prevent the (very improbable) chances of me giving up all together and start studying something like business or worse… the humanities. Oh, the humanity! (Get it? Lame joke, I know. My sense of humor is non-existent)


The biggest problem I am encountering is lack of motivation and the tendency to procrastinate. COSMOS comes in handy whenever morale gets dangerously low. Seriously, it’s the best television series ever. I’ve watched all thirteen parts COSMOS: A Personal Voyage thrice. For now, I’ve only watched one part of COSMOS: A Space-Time Odyssey. I try to catch the show on the National Geographic Channel whenever possible.

The Internet is your Friend


There are lots of awesome channels on Youtube that keep me interested and up-to-date on science related stuff. The ones I watch regularly are:

  • Sci Show
  • VSauce
  • The PBS Idea Channel
  • Minute Physics
  • Minute Earth
  • Sixty Symbols
  • Numberphile
  • Computerphile
  • CGP Grey
  • MentalFloss
  • Vihart

On top of that there are also channels and websites that actually help me (and a lot) in understanding the stuff I self-learn. Two of my favourite are:

Social Media is Your Enemy

Facebook is the biggest waste of time humanity has heard of. I once watched a TED Conference by some electronic (or telecommunication) engineer where the growing innovation in Africa was discussed. In the middle of it, the guy said something like,

So…why is most of the innovation now happening in Africa? Because the rest of the world is busy checking their facebook.

I agree with him completely. Twitter’s even worse.

Social Media is also Your Friend

Okay. Believe it or not, I found out a neat way to convert both Facebook and Twitter from the irrational and illogical overly argumentative hatred-inciting intolerant lunatic asylums they are to significantly more informative and educational (yes, educational!) places. Here’s what I did.

Facebook: Unliked all religio-political, nationalistic, meme-ridden, humorous, sports-related and miscellaneous nonsensical pages and left out only strictly scientific and informative pages. Some nice ones I left out include:

  • From Quarks to Quasars
  • I F***ing Love Science
  • Our Place in the Cosmos
  • Bill Nye – The Science Guy

Next, I un-followed most of the overly political or religious people in my friend list along with all the people who tended to share a lot of time-wasting stuff like cliched jokes and memes and people I didn’t really care that much about. (I didn’t unfriend them, just un-followed them. This way I can avoid seeing their posts in my news feed and yet not declare social warfare against them).

Twitter: Followed a similar procedure. Un-followed most people, leaving out only people who gave educational, informative or inspirational tweets. Some of the people I still follow include Neil de-Grasse Tyson, Dr. James Grime, Numberphile, CarlSaganQuoted, ThisDayinMath etc.

Avoid Sports and News like the Plague

Another redundant waste of time. I tried a bunch of rehab tactics to reduce my cricket-watching addition. First, I cut out watching all the preliminary matches. Waste of time. If there’s a big competition, I don’t start keeping track of the Pakistani team until it reaches the semi-finals (it almost always reaches the semi-finals because we’re awesome).

Next, I don’t watch the first half/innings/whatever-it’s-called anymore. Most of the stuff gets done in the second half anyway. If it’s a fifty over match, I only watch the first ten and the last ten overs. That’s when all the boundaries are usually made. The rest is just mindless running between the wickets. In T20s, I only watch the last 5-6 overs. Also, if it looks like Pakistan’s losing, I just leave. No point watching the rest of the game. Even if, by some chance, Pakistan manages to win, someone will tell me anyway.

I don’t watch news, like, at all. My main sources of news and international political analyses are passing conversations with my mother, and I usually forget most of it by the end of the hour. Life is exponentially happier when one is socially irresponsible, unaware of contemporary global issues and completely unpatriotic.

Read Science-Fiction

I like Science Fiction. Some of my favourites are:

  • Contact by Carl Sagan
  • The Martian by Andy Weir
  • The Time Machine by H G Wells
  • Journey to the Center of the Earth by Jules Verne

Write Blog Posts about Physics

Like this one.


Becoming a Theoretical Physicist – Phase 1

What’s the big idea, you ask? Well, my goal is to self-study as much stuff as I can to enable me to at least cover the foundations of the body of  knowledge required for mainstream theoretical physics. Why would I want to spend my time studying aimlessly to become a theoretical physicist in the first place? Primarily because it seems like a better way to spend time than programming video games, which is my other calling in life.


If physicists and mathematicians could be given scores from 1 to 100, with Leibniz, Newton, Dirac et al getting a 100 and that “observational science” bloke who debated Bill Nye getting a zero, I’d probably put myself in the 1.5 – 2.5 range. By the end of Phase 1, I plan to elevate myself to a 5 (possibly a 7, if I’m lucky).

So what is Phase 1? Well, Phase 1 of this project consists of learning the language of the universe i.e Mathematics. Physics requires a profound understanding of several regions of mathematics, hence I feel it necessary to learn a bit of the mathematical essentials before I plunge into classical and quantum  mechanics. Here is what I plan to learn in Phase 1:

  • Calculus
  • Linear Algebra
  • Advanced Calculus
  • Number Theory
  • Probability Theory
  • Real Analysis
  • Complex Analysis
  • Logic
  • Topology

How long will it take me to complete Phase 1? Probably the better part of 5 years or so, if all goes well. What next? I haven’t yet completely decided what Phase 2 will consist of, but there’s a high chance of it containing Classical Mechanics, Electro-magnetism and Quantum Mechanics, at least at an introductory level.

Will it be worth all the blood, toil and sweat? Yes. Even if I don’t end up being a physicist (or engineer), all this knowledge will come in handy someday, I’m sure.

On a side note

A Mathematician’s Apology by G.H Hardy is a pretty good read. Also, Khan Academy’s Cosmology and Astronomy playlist is awesome:

Limits – Calculus Section 1.1

Definition of a Limit

Let f(x) be defined for all x in an interval about x = a but not necessarily at x = a. If there is a number L such that to each positive number \epsilon there corresponds a positive number \delta such that

|f(x) - L| < \epsilon provided  0 < |x - a| < \delta,

we say that L is the limit of f(x) as s approaches a, and write

\lim \limits_{x \to a} f(x) = L

- Quick Calculus by Daniel Kleppner and Norman Ramsey – 2nd Edition, 1985

Calculating π ( Pi ) with Python


For fun I decided to write a python script to calculate the mathematical constant \pi (Pi). Here’s my code

# Author: Muhammad Ahmad Tirmazi
# Date: January 4, 2014
from decimal import *
import math

class PiCalculator(): #Calculates Pi
    def __init__(self, prec):
        getcontext().prec = prec # the precision
    def nilakantha(self, end): # Nilakantha's series
        op = '+'
        x = Decimal(3)
        for n in range(2, end, 2):
            if (op == '-'):
                x -= ( Decimal(4) / Decimal((n * (n+1) * (n+2))) )
                op = '+'
                x += ( Decimal(4) / Decimal((n * (n+1) * (n+2))) )
                op = '-'
        return x

    def gregory_leibniz(self, end): # Gregory-Leibniz's series 
        op = '+'
        x = Decimal(0)
        for n in range(1, end):
            if (op == '-'):
                x -= ( Decimal(4) / Decimal(2*n - 1) )
                op = '+'
                x += ( Decimal(4) / Decimal(2*n - 1) )
                op = '-'
        return x

    def ramanujan(self, end): # Ramanujan's series
        y = Decimal(0)
        for n in range(0, end):
            y += ( Decimal(math.factorial(4*n)) * Decimal((1103 + 26390*n)) )\
              / (Decimal(math.pow( Decimal(math.factorial(n)), 4)) \
                 * Decimal(math.pow(396, 4*n)) )
        y *= ( Decimal(2) * Decimal(math.sqrt(2)) ) / Decimal(9801)
        y = Decimal(1/y)
        return y

    def chudnovsky(self, end):
        y = Decimal(0)
        for n in range(0, end):
            y += ( Decimal(math.factorial(6*n)) * \
                   Decimal((13591409 + 545140134*n)) )\
              / ( Decimal(math.pow( \
                  Decimal(math.factorial(3*n)) * Decimal(math.factorial(n)), 3)) \
                 * Decimal(math.pow(-640320, 3*n)) )
        y *= ( Decimal(12) / Decimal(math.pow(640320, 1.5)) )
        y = Decimal(1/y)
        return y        

    def in_built(self): # Stored Value by Python implementation
        return Decimal(math.pi)

I did a test-run allowing ten iterations to each method:

def main():

    calc_pi = PiCalculator(10**3)

    pi_s = calc_pi.in_built()
    pi_n = calc_pi.nilakantha(10)
    pi_gl = calc_pi.gregory_leibniz(10)
    pi_r = calc_pi.ramanujan(10)
    pi_c = calc_pi.chudnovsky(10)

    separator = "\n\n\n********\n\n"

    print("Stored Value: ", pi_s, separator)
    print("Nilakantha: ", pi_n, separator)
    print("Gregory-Leibniz: ", pi_gl, separator)
    print("Ramanujan: ", pi_r, separator)
    print("Chudnovsky: ", pi_c, separator)
    input("press any key to continue")


I compared my results with this. The Gregory-Leibniz method was accurate only to the first digit. Nilakantha to the first 2 digits. Chudnovsky was accurate to the first 14 digits and Ramanujan’s method turned out to be the best so far by yielding 16 accurate digits.

Next, I decided to give the Nilakantha and Gregory-Leibniz methods a bit of an advantage by allowing then 10^4 iterations each, while I increased the iterations of the Chudnovsky and Ramanujan to only 15.

 pi_s = calc_pi.in_built()
 pi_n = calc_pi.nilakantha(10**4)
 pi_gl = calc_pi.gregory_leibniz(10**4)
 pi_r = calc_pi.ramanujan(15)
 pi_c = calc_pi.chudnovsky(15)

This time Gregory-Leibniz was accurate to the first 4 digits and Nilakantha to the first 11 digits. Chudnovsky’s and Ramanujan’s methods still gave an accuracy of 14 digits and 16 digits respectively.

Overall, it was a pretty educational experience. I found out that for the number of iterations I tried out (unless I made a mistake), the methods, in order of decreasing accuracy are:

  • Ramanujan — 16 digits on 15 iterations (Most Accurate)
  • Chudnovsky — 14 digits on 15 iterations
  • Nilakantha — 11 digits on 10^4 iterations
  • Gregory-Leibniz — 4 digits on 10^4 iterations (Least Accurate)

Research Paper: A Simplified Mathematical Model of The Effects of Different Levels of Nitrogen on…


Author: Muhammad Ahmad Tirmazi

Date: December 26, 2013

Download PDF: link

Note: If anyone is a registered endorser for Math.GM on Arxiv, I would appreciate it if he or she endorses my paper.

Hero’s Formula and The Area of Triangles

Let’s say you have a triangle ABC with sides of length a, b and c.


Imagine the vertical height and the angles of the triangle are unknown. How would you go about finding the area of the triangle? Well, using the simple \frac{1}{2} \times base \times height formula would obviously be a little tricky since it would require calculating the vertical height of the triangle.

It would be a bit simpler to find the area using the \frac{1}{2} \times a \times b \times \sin c method, but then you will need to use something like the cosine rule to find the angle of at least one of the vertexes. If only there was some simple, elegant method that allowed one to calculate the area of a triangle just from the length of its sides without first having to first figure out the vertical height or the angles of the vertexes of the triangle!

Hero’s formula allows one to do exactly that! Here is how you calculate the area, A, of a triangle with sides ab and c using Hero’s formula…

A = \sqrt{s(s-a)(s-b)(s-c)}

where s is the semi-perimeter of the triangle i.e

s = \frac{a + b + c}{2}

Now, say we have a triangle PQR with sides of length 5, 11 and 12 units respectively…


Let’s use Hero’s formula to find its area. First let’s calculate its semi-perimeter, s.

s = \frac{a + b + c}{2} \Rightarrow \frac{5 + 11 + 12}{2} \Rightarrow \frac{28}{2} \Rightarrow 14 \: \mathtt{units}

Next use Hero’s formula with s = 14, = 5, = 11 and = 12 …

A = \sqrt{s(s-a)(s-b)(s-c)}

\Rightarrow \sqrt{14(14-5)(14-11)(14-12)}

\Rightarrow \sqrt{14 \times 9 \times 3 \times 2}

\Rightarrow \sqrt{756} \approx 27.5 \: \mathtt{sq. units}

and that’s all there is to it!

Hero’s formula is widely believed to be invented/discovered by the Greek mathematician and engineer, Hero of Alexandria in 60 AD.

Note: For a rigorous proof of Hero’s formula, see this link.

Sum of Consecutive Odd Numbers

If one sums up a series of consecutive odd numbers starting from one, the total sum is a perfect square of the number of odd numbers added.In other words, the sum of the first n odd numbers has to be n^2. Here is what I mean,

n = 1 \Rightarrow 1 = 1^2 = 1

n = 2 \Rightarrow 1 + 3 = 2^2 = 4

n = 3 \Rightarrow 1 + 3 + 5 = 3^2 = 9

n = 4 \Rightarrow 1 + 3 + 5 + 7 = 4^2 = 16

n = 5 \Rightarrow 1 + 3 + 5 + 7 + 9 = 5^2 = 25

and so on…

Why does this happen? Let’s conceptualize it graphically. Let’s say you have a square of side 1 unit:


How many squares do you need to add to turn this into a 2×2 square?


You need 3 more units!

Next, how many do you need for a 3×3 square?


You need 5 more units!

So in order to turn a square of area 1 sq. units into a square with an area of 2 sq. units, you need to add 3 units. To turn it into a square with an area of 3 sq. units, you need to add 5 more units. How much additional units would a 4×4 square require? 7 more units! 1 , 3 , 5 , 7 , … you get the idea!

Note: A rigorous analytical proof can be found in the book The Higher Arithmetic by R. Davenport

The Most Destructive Chemists in History

Alfred Nobel

Alfred Nobel

He made an empire by selling arms and dynamite (his own invention). In 1888, his brother Ludvig died. There was a misunderstanding and French newspapers  assumed he was dead instead of Ludvig. They posted obituaries that stated things like, “The merchant of death is dead” and “Dr. Alfred Nobel, who became rich by finding ways to kill more people faster than ever before, died yesterday” Alfred read the obituaries and (I’m assuming) out of regret, or at least embarrassment, established the Nobel prize. Kind of ironic, right?

Fritz Haber

Fritz Haber

Invented the Haber process…to help the Germans make bombs. Then aided the development of chemical weapons. His wife, also a chemist, was opposed to all the death and misery he was causing with his work in chemical warfare. She shot herself in the head with his revolver after the first successful use of chlorine by Germany in a battle. He departed the next morning to oversee them being used against the Russians on the Eastern Front. So yeah, his wife committed suicide in protest of chemical weapons and he… didn’t care.

Anyway, at least the guy was a genius. His invention, the Haber process is now used to make fertilizers to help feed the world. Most of us would not have been alive today without him, since without the Haber process there would not have been enough food production to feed a global population of seven billion. In other words, he saved more lives than literally any other person in history.

Thomas Midgley, Jr.

Thomas Midgley, Jr.

This person is annoying. He damaged the environment and humanity while trying to help it. In other words, he messed up. To start with, he introduced leaded gas. Next, he played a major role in replacing compounds such as ammonia and sulfur-dioxide used in refrigerators and air-conditioners with CFCs. This caused Ozone layer depletion. Midgley has literally harmed the Earth’s atmosphere more than any other organism in history.

Interestingly, after becoming severely disabled at the age of 51, he created a system of pulleys and strings to help people lift him off from the bed. He got entangled in the ropes of this system and died of strangulation at the age of 55. In other words, he died by his own hands. I wonder if this qualifies as an extremely delayed and elaborate method of suicide.

Pakistan: Science and Research

Pakistan’s contributions to science are embarrassingly few compared to countries like, say, Japan or Germany or even Korea. However, recently I found out that our scientific research infrastructure isn’t as horrible as I expected. In other words: believe it or not, we have actually done something as a nation other than producing nukes and terrorists. In fact, unless Mian Sahab and the other idiots in the PMLN end up politicizing, corrupting and/or decreasing the funding of the few educational organisations and research institutes we have, I think Pakistan might actually produce a few Nobel laureates in the next few decades.

Why do I say these things? Well, I’ve found some things I didn’t know about earlier.

National Center for Physics

Chairman PAEC with DG CERN

Yes, incredible as it might seem, we actually have a National Center for Physics; and yes, they actually do something besides hogging the tax-payer money. There’s also a Joint CERN-Pakistan Committee. In addition, if the Tinday Baradraan don’t mess things up as I said earlier, Pakistan might even become an associate-member of CERN soon (see here and here), not to mention the 42 Pakistani physicists working at CERN.

Pakistan Atomic Energy Commission


Yes, the same highly-classified department that created and maintains the nukes. The very same war-mongering, budget-draining, international-reputation-ruining, sanction-inducing, economy-ruining, inflation-causing monster all us Pakistani leftists love to despise. People will hate me for saying this but I think it actually gave a (very) slight amount of benefit to the country. No, I’m not trying to give excuses for all the problems it has caused. I know the incredibly high amount of money the government wastes on the PAEC can be used for health, education, homeland security, development and poverty alleviation.

Love it or hate it, however, one can’t deny the PAEC’s role in the scientific and technological advancement of the country, Besides, compared to all the other unnecessary stuff done with the defence budget, I think this might actually be seen as productive. At least it helps generate a bit of electricity via nuclear power stations. Not to mention its research contributions and collaboration with CERN.

The Pakistan Institute of Nuclear Science and Technology (PINSTECH), which is part of PAEC’s domain, is the most advanced research institute in the country. It has three nuclear reactors and a particle accelerator (yes, they actually have a particle accelerator!).  I couldn’t find any picture of PINSTECH online, probably because of all the ‘top-secret highly-classified’ aura that surrounds it.

Jinnah Antarctic Station


It turns out Pakistan is one of the few countries that has a research station in Antarctica, and the majority of us Pakistanis don’t even know about it. Pakistan is also an associate member of Scientific Committee on Antarctic Research (SCAR).

Space & Upper Atmosphere Research Commission


To be frank, SUPARCO hasn’t really done much since its establishment in 1961, except for launching a few satellites (Badr-1Badr-2 and PakSat-1) and create a satellite ground-station. This is mainly due to the embarrassingly low budget it gets (a miserly $75.1 million, only about 0.004% of NASA’s prodigious $18.724 billion). But hey, we have a space program! that’s still something, right? And it might even do something significant in the future if the government decides to spend some money on actual scientific research instead of topping up the nuclear arsenal.

On a side note…

Abdus Salam


All of the organisations I listed were directly or indirectly established by this legendary man. He was the first chairman of SUPARCO in 1961 and envisioned a great future for the program. Truly a great Pakistani.

Eating Grass: The Making of the Pakistani Bomb

eating_grassThis new book written by Brigadier General (retd.) Feroz Khan gives a complete account of Pakistan’s journey to becoming a nuclear power. The title alludes to Prime Minister Zulfikar Ali Bhutto’s famous quote:

we will eat grasseven go hungry, but we will get one of our own (atomic bomb).

Previous Older Entries



Get every new post delivered to your Inbox.

Join 211 other followers