# Math notes

From raju

## Contents

### dummy

#### useful links

- https://oeis.org/ - The On-Line Encyclopedia of Integer Sequences. If you are ever dealing with a sequence of numbers and wondering if there's an underlying structure, this is a great place to start.
- http://ergodic.ugr.es/cphys/LECCIONES/FORTRAN/power_method.pdf - Power method for approximating eigenvalues.

#### paradoxes

- https://en.wikipedia.org/wiki/List_of_paradoxes - List of paradoxes

- https://en.wikipedia.org/wiki/Potato_paradox - potato paradox

This applies when profiling code. If you have a hotspot that takes 99% of the time and optimize it until your whole program is twice as fast, now that hotspot takes 98% of the time.

- https://en.wikipedia.org/wiki/False_positive_paradox - False positive paradox

#### partial fractions

- An easier approach to partial fractions decomposition - https://jaydaigle.net/blog/calculus/easier-partial-fractions/ . See the comments also.
- https://en.wikipedia.org/wiki/Heaviside_cover-up_method

#### Horner's method

- https://en.wikipedia.org/wiki/Horner%27s_method - Useful to divide a polynomial by a monomial

#### Newton's identities

- https://en.wikipedia.org/wiki/Newton%27s_identities#Formulation_in_terms_of_symmetric_polynomials - Useful in solving problems such as https://stackoverflow.com/questions/3492302/easy-interview-question-got-harder-given-numbers-1-100-find-the-missing-numbe?rq=1

#### likelihood function

The definition of the likelihood function for continuous case:

The left term means “the likelihood of the parameters , given data ”.

Here the notation does not mean the same as the conditional notation. Another representation of the likelihood that is often used is , which is better in the sense that it makes it clear that it’s not a conditional, however, it makes it look like the likelihood is a function of the data and not of the parameters.

#### averages

average of squares > square of averages

ex:- for [3,4]

average of squares = (3**2 + 4**2) / 2 = 12.5

square of averages = ((3 + 4)/2)**2 = 3.5**2 = 12.25

#### simplifications I came across

#### laplace transform

- https://www.youtube.com/watch?v=n2y7n6jw5d0 - A visual explanation of the Laplace Transform and its applications.
- https://www.youtube.com/watch?v=hqOboV2jgVo - shows that the Laplace transform is just a continuous analogue of the summation of a power series.

### mental math

#### convert from miles to km

Double four times and divide by ten as soon as possible (i.e. the first time you see a zero on the end, drop it). This amounts to multiplying it by 1.6. Actual formula is 1 mi = 1.60934 km.

Ex:- 30 mph -> 3 (drop the zero) -> 6 -> 12 -> 24 -> 48 kmph.

No need to count how many times you are doubling. Look for something between 1x and 2x of the original number.

Ex:- 135 mph -> 270 -> 27 -> 54 -> 108 (keep going, less than 135) -> 216 kmph (stop here, less than 2* 135 = 270)

#### pounds to kilos

Divide by 2, less 10%. This amounts to multiplying it by 0.45. Actual formula is 1 lb = 0.453592 kg

Ex:- 160 lbs = 80 - 8 = 72 kg

#### kilos to pounds

Multiple by 2, add 10%. This amounts to multiplying it by 2.2. Actual formula is 1 kg = 2.20462 lbs