# Challenge Math Challenge - February 2019

• Featured

#### fresh_42

Mentor
2018 Award
I will solve Problem 4.
It is to find $L = \lim_{n\to\infty} n ((1 + x/n)^n - e^x)$.

The first term in parentheses, $(1 + x/n)^n$, is well-known for having $e^x$ as a limit as $n\to\infty$. So to find L, we must evaluate $\lim_{n\to\infty} n (\text{that term's difference from } e^x)$. So in order to have a more easily-expanded expression, we do
$$\left( 1 + \frac{x}{n} \right)^n = \exp \log \left( \left( 1 + \frac{x}{n} \right)^n \right) = \exp \left( n \log \left( 1 + \frac{x}{n} \right) \right)$$
We next expand the logarithm in an infinite series, and then do that to the exponential:
$$\left( 1 + \frac{x}{n} \right)^n = \exp \left( \sum_{k=1}^\infty \frac{(-1)^{k+1} x^k}{k n^{k-1}} \right) = \exp \left( x - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right) = e^x \left( 1 - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)$$
Plugging this into the expression for L, we find
$$L = \lim_{n\to\infty} n e^x \left( 1 - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) - 1 \right) = \lim_{n\to\infty} e^x \left( - \frac{x^2}{2} + O\left( \frac{1}{n} \right) \right) = - \frac{x^2}{2} e^x$$
$$L = - \frac{x^2}{2} e^x$$
Just a little remark:
$$\exp \left( x - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right) = e^x \left( 1 - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)$$
could have had been a bit more elaborated in my opinion. Obviously we have
$$\exp \left( x - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)=e^x \cdot \exp \left( - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)$$
which raises the question why $\exp \left( - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)\stackrel{?}{=}\left(1 - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)$. No big deal, but a little remark how you approximated here, just words, no equations, would have had improved readability a lot in my opinion.

#### lpetrich

I will solve Problem 2.
One must find a function T(n) of n, a function that satisfies the recurrence relation $T(n) = 2T(n/3) + n$ where $T(1) = 1$ and n is a power of 3.

This can be simplified by using the exponent of 3 in each value of n: $n = 3^k$. So I define a function that is a function of that exponent: $T(n) = U(\log_3 n)$ or $T(3^k) = U(k)$. Using that definition turns our problem into $U(k) = 2U(k-1) + 3^k$ with $U(0) = 1$.

This recurrence is inhomogeneous, and one can add a homogeneous recurrence to it: $U(k) \to U(k) + V(k)$, where $V(k) = 2V(k-1)$. It is easily verified:
$$U(k) + V(k) = 2U(k-1) + 3^k + 2V(k) = 2(U(k-1) + V(k-1)) + 3^k$$
The homogeneous part's solution is easy: $V(k) = 2^k V(0)$. It also is easily verified: $2V(k-1) = 2 \cdot 2^{k-1} V(0) = 2^k V(0) = V(k)$.

The inhomogeneous part's solution is more difficult. One gets:
$$U(k) = 2U(k-1) + 3^k = 2(2U(k-1) + 3^{k-1}) + 3^k = 2(2(2U(k-2) + 3^{k-2}) + 3^{k-1}) + 3^k = \dots$$
This suggests a trial solution:
$$U(k) = \sum_{m=0}^k 2^{k-m} 3^m$$
Inserting it into the recurrence gives
$$2 \sum_{m=0}^{k-1} 2^{k-m-1} 3^m + 3^k = \sum_{m=0}^{k-1} 2^{k-m} 3^m + 3^k = \sum_{m=0}^k 2^{k-m} 3^m$$
which demonstrates its correctness. This result can be simplified further. In general,
$$\sum_{m=0}^k a^{k-m} b^m = a^k \sum_{m=0}^k \left( \frac{b}{a} \right)^m = a^k \frac{1 - (b/a)^{k+1}}{1 - b/a} = \frac{a^{k+1} - b^{k+1}}{a - b}$$
Inserting 3 and 2 gives us $U(k) = 3^{k+1} - 2^{k+1}$. Combining with the V recurrence gives $U(k) = 2^k C + 3^{k+1}$ for some constant C. It is easily verified:
$$2U(k-1) + 3^k = 2(2^{k-1} C + 3^k) + 3^k = 2^k C + (2 + 1) 3^k = 2^k C + 3^{k+1} = U(k)$$
What remains is to solve $U(0) = 1$. It is $C + 3 = 1$ or $C = -2$. Thus, the final result is
$$U(k) = 3^{k+1} - 2^{k+1}$$
or
$$T(n) = 3n - 2^{\log_3 n + 1}$$

#### lpetrich

I will solve Problem 1.
I will first solve it for the general value of the recurrence $T(n) = 2T(\lfloor n/2 \rfloor) + 1$, then insert $T(1) = 4$.

For the recurrence, I will first consider the general case of $T(n) = F(T(\lfloor n/2 \rfloor))$, and look for patterns in its solution.
• T(2) = T(3) = F(T(1))
• T(4) = T(5) = F(T(2)), T(6) = T(7) = F(T(3)) = F(T(2))
• T(8) = T(9) = F(T(4)), T(10) = T(11) = F(T(5)) = F(T(4)), T(12) = T(13) = F(T(6)) = F(T(4)), T(14) = T(15) = F(T(7)) = F(T(4))
• ...
This suggests that all values $T(n)$ are equal for $2^k \leq n \leq 2^{k+1}-1$ for each k. To verify this result, I divide this range by 2 and then round down. $\lfloor 2^k / 2 \rfloor = 2^{k-1}$ and $\lfloor (2^{k+1}-1) / 2 \rfloor = 2^{k-1} - 1$. Thus giving the corresponding range for k-1. Thus,
$$T(2^k \text{ to } 2^{k+1} - 1) = F(T(2^{k-1} \text{ to } 2^k-1))$$
with each range's values being equal.

I now change variables for $T(n)$ to get the exponent for 2: $T(n) = U(\log_2 n)$ or $T(2^k) = U(k)$. The equality over range means that $T(n) = U(\lfloor \log_2 n \rfloor)$. The recurrence becomes $U(k) = 2U(k-1) + 1$. Adding 1 to both sides gives $(U(k) + 1) = 2(U(k-1) + 1)$, giving the solution $U(k) = 2^k C - 1$ for some constant C. It is easy to verify:
$$2U(k-1) + 1 = 2(2^{k-1} C - 1) + 1 = 2^k C - 1 = U(k)$$
Since we have a value for T(1), this value gives U(0) = T(1), and the above solution in terms of U(0) is $U(k) = 2^k (U(0) + 1) - 1$.

Thus,
$$T(n) = 2^{\lfloor \log_2 n \rfloor} (T(1) + 1) - 1 = 2^{\lfloor \log_2 n \rfloor} \cdot 5 - 1$$
for T(1) = 4.

#### QuantumQuest

Gold Member
I will solve Problem 2.
In general the way you follow is correct but although I really appreciate your efforts, it is unnecessarily complicated. You can alternatively start from one of the suggested ways in the spoiler (I'm sure you can easily find which way to choose) and go in a much quicker way. In any case, your solution is absolutely acceptable and correct.
Now, in order to be precise - as we are in the context of algorithms for this question, we're interested for big $O$ and big $\Theta$ in comparison with $T(n)$. So, it would be best to express your result for $T(n)$ as $T(n) = 3n - 2n^{\log_3 2} \leq 3n - 2n^{0.63} = O(n)$. Now, as $T(n)$ has $n$ as a summation term we immediately see that $T(n) = \Theta(n)$.

#### QuantumQuest

Gold Member
I will solve Problem 1.
Very good.

We can work in the context of algorithms - as it is intended for this question, and use the guess method in a very simple way, which I'll show in order the question to be more clear to all.

The solution we choose to try by guessing in an optimal way is, obviously, of the order $O(n)$. So, we have to prove that $T(n) \leq cn$ where $c$ is a constant. Substituting in the given recurrence relation and applying strong induction we have $T(n) = 2c(\lfloor \frac{n}{2} \rfloor) + 1 \leq 2c(\frac{n}{2}) + 1 = cn + 1$.

At this point, we have to point out that the solution we guessed has not yet been proved, as we have not proved that $T(n) \leq cn$ albeit $cn + 1 = O(n)$. So, we have to modify our guess to $cn - b$ where $b$ is a constant. So, we have $T(n) \leq 2c(\frac{n}{2}) - 2b + 1 = cn + 1 - 2b \leq cn - b$, for all $b \geq 1$. Now, because there is the initial condition $T(1) = 4$ we have that it must hold $T(1) = 4 \leq c\cdot 1 - b$ so $c \geq 4 + b$ and because $b \geq 1$ it is $c \geq 5$. So, we have also found the lower bounds for the values of constants.

Last edited:

#### lpetrich

I will attempt to solve Problem 3.
The problem statement is to find the values of $\varphi$ that make $f \perp g = \int_1^\infty f(x) g(x) dx = 0$ for functions f(x) and g(x):
$$f(x) = \frac{K_1 x + K_2}{x^2} ,\ g(x) = \frac{K_3 x + K_2}{x^2}$$
where
$$K_1 = \cos \varphi - \sqrt{3}\sin \varphi + 1 ,\ K_2 = 2\sqrt{3}\sin \varphi ,\ K_3 = \cos \varphi - \sqrt{3}\sin \varphi - 1$$
Plugging the function expressions into X gives
$$f \perp g = \int_1^\infty \left( \frac{K_1}{x} + \frac{K_2}{x^2} \right) \left( \frac{K_3}{x} + \frac{K_2}{x^2} \right) dx = \int_1^\infty \left( \frac{K_1 K_3}{x^2} + \frac{(K_1 + K_3)K_2}{x^3} + \frac{(K_2)^2}{x^4} \right) dx$$
Using the well-known integral $\int_1^\infty x^{-n} \, dx = \frac{1}{1-n} x^{1-n} |_1^\infty = \frac{1}{n-1}$,
$$f \perp g = (K_1 K_3) + \frac{(K_1 + K_3) K_2}{2} + \frac{(K_2)^2}{3}$$
Inserting the expressions for the K's gives
$$f \perp g = (\cos^2\varphi - 2\sqrt{3}\cos\varphi\sin\varphi + 3 \sin^2\varphi - 1) + \frac{4\sqrt{3}\cos\varphi\sin\varphi - 12\sin^2\varphi}{2} + \frac{12 \sin^2\varphi}{3}$$
Simplifying further, and using a certain well-known trigonometric identity,
$$f \perp g = \cos^2\varphi + \sin^2\varphi - 1 = 0$$

Thus, $f \perp g = 0$ for all $\varphi$.

#### fresh_42

Mentor
2018 Award
I will attempt to solve Problem 3.
The problem statement is to find the values of $\varphi$ that make $f \perp g = \int_1^\infty f(x) g(x) dx = 0$ for functions f(x) and g(x):
$$f(x) = \frac{K_1 x + K_2}{x^2} ,\ g(x) = \frac{K_3 x + K_2}{x^2}$$
where
$$K_1 = \cos \varphi - \sqrt{3}\sin \varphi + 1 ,\ K_2 = 2\sqrt{3}\sin \varphi ,\ K_3 = \cos \varphi - \sqrt{3}\sin \varphi - 1$$
Plugging the function expressions into X gives
$$f \perp g = \int_1^\infty \left( \frac{K_1}{x} + \frac{K_2}{x^2} \right) \left( \frac{K_3}{x} + \frac{K_2}{x^2} \right) dx = \int_1^\infty \left( \frac{K_1 K_3}{x^2} + \frac{(K_1 + K_3)K_2}{x^3} + \frac{(K_2)^2}{x^4} \right) dx$$
Using the well-known integral $\int_1^\infty x^{-n} \, dx = \frac{1}{1-n} x^{1-n} |_1^\infty = \frac{1}{n-1}$,
$$f \perp g = (K_1 K_3) + \frac{(K_1 + K_3) K_2}{2} + \frac{(K_2)^2}{3}$$
Inserting the expressions for the K's gives
$$f \perp g = (\cos^2\varphi - 2\sqrt{3}\cos\varphi\sin\varphi + 3 \sin^2\varphi - 1) + \frac{4\sqrt{3}\cos\varphi\sin\varphi - 12\sin^2\varphi}{2} + \frac{12 \sin^2\varphi}{3}$$
Simplifying further, and using a certain well-known trigonometric identity,
$$f \perp g = \cos^2\varphi + \sin^2\varphi - 1 = 0$$

Thus, $f \perp g = 0$ for all $\varphi$.
That's correct.

Here is a more elegant solution:

If we define $p(x)=x^{-1}$ and $q(x)=\sqrt{3}(2-x)x^{-2}$. Then $\{\,p,q\,\}$ define a orthonormal basis of the subspace $V$ they span in $L^2([1,\infty))$. Now $f,g$ can be written as
$$f(x)=p(x)+p(x)\cos \varphi + q(x)\sin \varphi \, , \,g(x)=-p(x)+p(x)\cos \varphi +q(x) \sin \varphi$$
which means they point to the same point on the unit circle of $V$ from the left and from the right intersection with the diameter, and the statement follows by the theorem of Thales, i.e. all values of $\varphi$ fulfill the condition.

#### Leo Consoli

My attempt for High School problem 5:
Any number N when divided by 30 will leave a remainder S such that S∈{0,1,2,3...,29}. The goal is to prove that when N is prime,S is also prime or 1.
Assuming this is not the case and S is not equal to 1 or a prime number, since the prime factors of 30 are 2,3 and 5,and N is prime, then two primes bigger than 5 have to be divisors of S, but this condradicts the fact that s cant be bigger than 29.
As for when dividing any number N by 60, we can use the information that any prime P bigger than 5 can be written as 30x+y, being x a natural number and y a coprime of 30 between 0 and 29, so the possibilities for y are {1,7,11,13,17,19,23,29}, this is true because P is bigger than 5 and prime so it is coprime to 2,3 and 5, so P is coprime to 30, and so is it remainder when divided by 30. For x=0 and x=1 the remainder of the division is y itself, for the primes smaller and equal to 5 {2,3,5} the remainder is 1 since the division can be fatorated. For bigger values of x this doesnt always hold true (ex:109), so doing the same procedure lets say that there is a prime number N that when divided by 60 leaves a remainder y that is not prime or 1.The reaminder in dividing any number by 60 belongs to {0,1,2...,59}, so since the prime factors of 60 are 2,2,3 and 5, and N is prime, two primes bigger than 5 must be divisors of y, and this doesnt contradict the fact that y cant be bigger than 59 since 7x7=49.

Last edited:

#### fresh_42

Mentor
2018 Award
My attempt for High School problem 5:
Any number N when divided by 30 will leave a remainder S such that S∈{0,1,2,3...,29}. The goal is to prove that when N is prime,S is also prime or 1.
Assuming this is not the case and S is not equal to 1 or a prime number, since the prime factors of 30 are 2,3 and 5,and N is prime, the remainder S must be equal to the product of 2 prime numbers bigger than 5,...
because if $2,3$ or $5$ divided $S$, they would divide $N$, too: $N=30q +S$. It doesn't have to be a product of exactly two primes, but two primes bigger than $5$ have to be divisors, as per assumption $S$ isn't prime.
... but this contradicts the fact that S cant be bigger than 29.
One can also do it directly: Since $2,3,5 \nmid S$ all remainders which are left are primes or one: $1,7,11,13,17,19,23,29$. But the indirect method is nicer.
As for when dividing any number N by 60, we can use the information that any prime P bigger than 5 can be written as 30x+y, being x a natural number and y a coprime of 30 between 0 and 29, so the possibilities for y are {1,7,11,13,17,19,23,29}, this is true because P is bigger than 5 and prime so it is coprime to 2,3 and 5, so P is coprime to 30, and so is it remainder when divided by 30. For x=0 and x=1 the remainder of the division is y itself, for the primes smaller and equal to 5 {2,3,5} the remainder is 1 since the division can be fatorated. For bigger values of x this doesnt always hold true (ex:109), so doing the same procedure lets say that there is a prime number N that when divided by 60 leaves a remainder y that is not prime or 1.The reaminder in dividing any number by 60 belongs to {0,1,2...,59}, so since the prime factors of 60 are 2,2,3 and 5, and N is prime, the remainder y must be equal to the product of 2 prime numbers bigger than 5, and this doesnt contradict the fact that y cant be bigger than 59 since 7x7=49.
This is rather complicated and as far as I read it, it only shows that the proof above for $30$ does not work for $60$. However, this doesn't mean there cannot be another proof which will work! But your example $109=1\cdot 60 + 49$ is the counterexample which is needed to show, that the same statement for $60$ is actually wrong. That a certain proof does not work is meaningless, the example is already the proof that it cannot be proven (by any attempt).

#### Leo Consoli

because if 2,32,32,3 or 555 divided SSS, they would divide NNN, too: N=30q+SN=30q+SN=30q +S. It doesn't have to be a product of exactly two primes, but two primes bigger than 555 have to be divisors, as per assumption SSS isn't prime.
Thank you I will edit it.
One can also do it directly: Since 2,3,5∤S2,3,5∤S2,3,5 \nmid S all remainders which are left are primes or one: 1,7,11,13,17,19,23,291,7,11,13,17,19,23,291,7,11,13,17,19,23,29. But the indirect method is nicer.
I see, I didnt notice this method.
This is rather complicated and as far as I read it, it only shows that the proof above for 303030 does not work for 606060. However, this doesn't mean there cannot be another proof which will work! But your example 109=1⋅60+49109=1⋅60+49109=1\cdot 60 + 49 is the counterexample which is needed to show, that the same statement for 606060 is actually wrong. That a certain proof does not work is meaningless, the example is already the proof that it cannot be proven (by any attempt).
Thank you, if I had thought like this it would have been much easier.

#### fbs7

Holy choo-choo, what kind of high school is this? I can very barely follow these arguments, and I supposedly have a college degree!

#### QuantumP7

Just a little remark:
$$\exp \left( x - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right) = e^x \left( 1 - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)$$
could have had been a bit more elaborated in my opinion. Obviously we have
$$\exp \left( x - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)=e^x \cdot \exp \left( - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)$$
which raises the question why $\exp \left( - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)\stackrel{?}{=}\left(1 - \frac{x^2}{2n} + O\left( \frac{1}{n^2} \right) \right)$. No big deal, but a little remark how you approximated here, just words, no equations, would have had improved readability a lot in my opinion.
I'm very curious about this. I've been pouring over this solution because I think it's REALLY neat. So far, I've been able to follow:

$$\left( 1+ \frac{x}{n} \right)^{n} = e^{\ln \left( 1+ \frac{x}{n} \right)^{n}} = e^{n \ln \left( 1+ \frac{x}{n} \right)}$$

The series expansion for $\ln \left( 1+ \frac{x}{n} \right)$ is $\sum_{k=1}^\infty (-1)^{k+1} \frac{x^{k}}{kn^{k}}$ so that:
$$n \ln \left( 1+ \frac{x}{n} \right) = \sum_{k=1}^\infty (-1)^{k+1} \frac{x^{k}}{kn^{k-1}} = x- \frac{x^{2}}{2n} + \frac{x^{3}}{3n^{2}} - ... = x- \frac{x^{2}}{2n} + O \left( \frac{1}{n^{2}} \right)$$

Then,
$$\left( 1+ \frac{x}{n} \right)^{n} = e^{\ln \left( 1+ \frac{x}{n}\right)^{n}} = e^{n \ln \left( 1+ \frac{x}{n} \right)} = e^{ \left( x- \frac{x^{2}}{2n} + O \left( \frac{1}{n^{2}} \right) \right)}$$

So, in the parenthesis, we get $\left( \left( 1 + \frac{x}{n} \right)^{n} - e^{x} \right) = \left( e^{\left( x- \frac{x^{2}}{2n} + O \left( \frac{1}{n^{2}} \right) \right)} - e^{x} \right) = \left( e^{x} e^{- \frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} \right) - e^{x} = e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right)$

Then the whole expression becomes $\lim_{n \rightarrow \infty} n \left( \left( 1+ \frac{x}{n} \right) ^{n} - e^{x} \right) = \lim_{n \rightarrow \infty} n \left( e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right) \right)$

How do we get from $\lim_{n \rightarrow \infty} n \left( e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right) \right)$ to $\lim_{n \rightarrow \infty} e^{x} \left( -\frac{x^{2}}{2} + O \left( \frac{1}{n} \right) \right) = -\frac{x^{2}}{2}e^{x}$?

#### fresh_42

Mentor
2018 Award
I'm very curious about this. I've been pouring over this solution because I think it's REALLY neat. So far, I've been able to follow:

$$\left( 1+ \frac{x}{n} \right)^{n} = e^{\ln \left( 1+ \frac{x}{n} \right)^{n}} = e^{n \ln \left( 1+ \frac{x}{n} \right)}$$

The series expansion for $\ln \left( 1+ \frac{x}{n} \right)$ is $\sum_{k=1}^\infty (-1)^{k+1} \frac{x^{k}}{kn^{k}}$ so that:
$$n \ln \left( 1+ \frac{x}{n} \right) = \sum_{k=1}^\infty (-1)^{k+1} \frac{x^{k}}{kn^{k-1}} = x- \frac{x^{2}}{2n} + \frac{x^{3}}{3n^{2}} - ... = x- \frac{x^{2}}{2n} + O \left( \frac{1}{n^{2}} \right)$$

Then,
$$\left( 1+ \frac{x}{n} \right)^{n} = e^{\ln \left( 1+ \frac{x}{n}\right)^{n}} = e^{n \ln \left( 1+ \frac{x}{n} \right)} = e^{ \left( x- \frac{x^{2}}{2n} + O \left( \frac{1}{n^{2}} \right) \right)}$$

So, in the parenthesis, we get $\left( \left( 1 + \frac{x}{n} \right)^{n} - e^{x} \right) = \left( e^{\left( x- \frac{x^{2}}{2n} + O \left( \frac{1}{n^{2}} \right) \right)} - e^{x} \right) = \left( e^{x} e^{- \frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} \right) - e^{x} = e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right)$

Then the whole expression becomes $\lim_{n \rightarrow \infty} n \left( \left( 1+ \frac{x}{n} \right) ^{n} - e^{x} \right) = \lim_{n \rightarrow \infty} n \left( e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right) \right)$

How do we get from $\lim_{n \rightarrow \infty} n \left( e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right) \right)$ to $\lim_{n \rightarrow \infty} e^{x} \left( -\frac{x^{2}}{2} + O \left( \frac{1}{n} \right) \right) = -\frac{x^{2}}{2}e^{x}$?
Let $f(x)=- \frac{x^{2}}{2n}+ O \left( \frac{1}{n^{2}} \right)$ for the moment. Then by the series expansion of the exponential function we have $\exp(f(x))=1+f(x)+\frac{1}{2}f(x)^2 +\ldots$ and so
\begin{align*}
n \left( e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right) \right)&=e^x \cdot n \cdot \left( e^{f(x)}-1 \right) \\
&= e^x \cdot n \cdot \left( f(x)+ \frac{1}{2}f(x)^2+ \frac{1}{6}f(x)^3+\ldots \right)\\
&= e^x \left\{ n \cdot \left( - \frac{x^2}{2n} + O(n^{-2}) \right) + n \cdot \frac{1}{2} \left( - \frac{x^2}{2n} + O(n^{-2}) \right)^2 + n \cdot g_1(x) \cdot O(n^{-3}) \right\}\\
&= e^x \left\{ -\frac{x^2}{2} +O(n^{-1}) + \frac{1}{2} \cdot \frac{x^4n}{4n^2} + g_2(x) \cdot O(n^{-2}) \right\}\\
&= e^x \left\{ -\frac{x^2}{2} \right\} + g_3(x) \cdot O(n^{-1})\\
& \to e^x \cdot \left( -\frac{x^2}{2} \right)
\end{align*}
with some functions $g_i(x)$ and where we have generously rounded the big-O expressions to $O(n^{-1})\,.$

#### QuantumP7

Let $f(x)=- \frac{x^{2}}{2n}+ O \left( \frac{1}{n^{2}} \right)$ for the moment. Then by the series expansion of the exponential function we have $\exp(f(x))=1+f(x)+\frac{1}{2}f(x)^2 +\ldots$ and so
\begin{align*}
n \left( e^{x} \left( e^{\frac{x^{2}}{2n}} e^{ \left( O \left( \frac{1}{n^{2}} \right) \right)} -1 \right) \right)&=e^x \cdot n \cdot \left( e^{f(x)}-1 \right) \\
&= e^x \cdot n \cdot \left( f(x)+ \frac{1}{2}f(x)^2+ \frac{1}{6}f(x)^3+\ldots \right)\\
&= e^x \left\{ n \cdot \left( - \frac{x^2}{2n} + O(n^{-2}) \right) + n \cdot \frac{1}{2} \left( - \frac{x^2}{2n} + O(n^{-2}) \right)^2 + n \cdot g_1(x) \cdot O(n^{-3}) \right\}\\
&= e^x \left\{ -\frac{x^2}{2} +O(n^{-1}) + \frac{1}{2} \cdot \frac{x^4n}{4n^2} + g_2(x) \cdot O(n^{-2}) \right\}\\
&= e^x \left\{ -\frac{x^2}{2} \right\} + g_3(x) \cdot O(n^{-1})\\
& \to e^x \cdot \left( -\frac{x^2}{2} \right)
\end{align*}
with some functions $g_i(x)$ and where we have generously rounded the big-O expressions to $O(n^{-1})\,.$
Aha! Thank you SO much! Awesome question and solution!

"Math Challenge - February 2019"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving