Archive for May, 2013

red & gold apples

Here is the question:

There are x green apples and y red apples in a box with




When two apples are drawn at random, the probability that the two apples are of the same color is exactly one-half. Please find the largest possible value of x.


First of all, the probability of the getting same color is one-half.

P(\mbox{same color}) = \dfrac{x}{x+y}\cdot\dfrac{x-1}{x+y-1} + \dfrac{y}{x+y}\cdot\dfrac{y-1}{x+y-1} = \dfrac{1}{2}

then do some algebraic manipulation, like cross multiplying and stuffs like that.

2x^2-2x+2y^2-2y = x^2+xy-x+xy+y^2-y




we are good at this point, because we have found a relationship between (x-y) and (x+y),

since x is greater than y so (x-y) is positive and we can take the square root of the inequality below, and since x and y are integers we will take the integer part of the square root of 2008.


x-y \leq 44

and since

x+y = (x-y)^2

then we have

x+y = (x-y)^2 \leq 44^2 = 1936

Now here comes the tricky part where most students can’t get to, let’s look at what the problem asks us to find.  It says find the largest possible value of x.  So we want to have this,

x \leq \mbox{some number}

in order to have this, we need to play around with the “x” and try to rewrite it in terms of something we have in hand.  So what do we have?  We have these two inequalities

x-y\leq44 \quad \mbox{and} \quad x+y\leq1936

So let me play around with my “x”, I love this part coz this is the technique I personally gave it a name “make something out of nothing method” 🙂

x=\dfrac{x}{2}+\dfrac{x}{2}+\dfrac{y}{2}-\dfrac{y}{2} =\dfrac{x+y+x-y}{2}

\leq\dfrac{1936+44}{2}= 990

Therefore there are at most 990 green apples in the box 🙂


calculus question

Posted: May 12, 2013 in Mathematics


If f(x) = \displaystyle \int_x^{x+1} e^{t^2} - e^{x^2} \;dt

What is f'(x) ??


f(x) = \displaystyle \int_x^{x+1} e^{t^2} - e^{x^2} \;dt

= \displaystyle\int_x^{x+1}e^{t^2} \; dt - e^{x^2}\int_x^{x+1}\;dt

= \displaystyle\int_x^{x+1}e^{t^2} \;dt - e^{x^2}

By the part one of Fundamental Theorem of Calculus,

f'(x) = e^{(x+1)^2} - e^{x^2} - 2xe^{x^2}


Let [x] be the largest integer not greater than x.  How many numbers of integer n are there such that \left[\dfrac{n^2}{3}\right] are prime number?


Since a set of integers can be expressed as the forms,

3k, 3k+1, 3k+2, \forall k\in\mathbb{Z}

Then we have 3 cases to consider,

Case 1, n=3k

\left[\dfrac{(3k)^2}{3}\right] = \left[3k^2\right] = p

Since p is prime,

k=1, \therefore n=3

Case 2, n=3k+1

\left[\dfrac{(3k+1)^2}{3}\right] = \left[\dfrac{9k^2+6k+1}{3}\right] \\ = \left[3k^2+2k+\dfrac{1}{3}\right]=3k^2+2k=k(3k+2)= p

Since p is prime,

k=1, \therefore n=4

Case 3, n=3k+2

\left[\dfrac{(3k+2)^2}{3}\right] = \left[\dfrac{9k^2+12k+4}{3}\right] \\ = \left[3k^2+4k+\dfrac{4}{3}\right] = 3k^2+4k+1 = (3k+1)(k+1) = p

Since p is prime, k has no solution.

Therefore, the only possible integers n are 3 or 4.