Add Me!Close Menu Navigation

From fighting crime and arresting pirates to blasting away zombies, you can always count on a superhero. Unfortunately, I am definitely not that person.

Add Me!Open Categories Menu
18 January

Fixing floating point cancellation I

How can you compute \sqrt{x^2+1}-x to 14 digits of accuracy within the domain |x| < 10^8?

17 January
Posted in Numerical Analysis

Floating point quirks

In this post, we’ll explore a scenario where the non-commutativityassociativity of floating point arithmetic can lead us into trouble.

Let a_k = \frac{1}{k(k+1)} and S_n = \sum_{k=1}^n a_k. Write a computer program to compute this sum.

25 November
Posted in Reading Diary

Solving first order PDEs with Characteristics

Use the method of characteristics to solve the PDE system

     $$\begin{cases} u_x + xu_y = 0 \\ u(0,y) = f(y) \end{cases}$$

15 August
Posted in Article, Math Problems

Power Reduction in Congruences

Suppose you have integers a,b that are relatively prime to m such that

    $$ a^x \equiv b^x \mod m \hspace{4mm}\mbox{ and }\hspace{4mm} a^y \equiv b^y \mod m $$

then

    $$ a^{\gcd(x,y)} \equiv b^{\gcd(x,y)} \mod m $$

14 August
Posted in Article, Math Problems

Even Pascals

Let a=4k-1, where k is an integer. Prove that for any positive integer n the number

     $$ s_n = 1 - {n \choose 2}a + {n \choose 4}a^2 - {n \choose 6}a^3 + \cdots $$

is divisible by 2^{n-1}.

14 August
Posted in Article, Math Problems

Sequences in Sequences

Define the sequence (a_n)_n recursively by a_1 = 1 and

     $$ a_{n+1} = \frac{1 + 4a_n + \sqrt{1+24a_n}}{16} ,\hspace{4mm} \mbox{for $n \ge 1$.} $$

Find an explicit formula for a_n in terms of n.

14 August
Posted in Article, Math Problems

More Linear Recurrences

Let (x_n )_n = 0 be defined by the recurrence relation x_{n + 1} = ax_n + bx_{n - 1}, with x_0 = 0. Show that the expression x^2_n - x_{n - 1} x_{n + 1} depends only on b and x_1, but not on a.

13 August
Posted in Article, Math Problems

Almost Linear

Find the general term of the sequence given by x_0 = 3, x_1 = 4, and

    $$(n + 1 )(n + 2 )x_n = 4 (n + 1 )(n + 3 )x_{n - 1} - 4 (n + 2 )(n + 3 )x_{n - 2}$$

13 August
Posted in Article, Math Problems

Polynomial Divisors

Let p(x) = x^2 -3x + 2. Show that for any positive integers  n \ge 2 there exists unique numbers a_n, b_n such that the polynomial  x^n - a_n x - b_n is divisible by p(x)

13 August
Posted in Article, Math Problems

Analytical Fibonacci

We derive Binet’s equation for the nth Fibonacci number as

     $$ F_n = \frac{1}{\sqrt 5}\left( \left(\frac{1+\sqrt 5}{2}\right)^n -  \left(\frac{1-\sqrt 5}{2}\right)^n  \right) $$