A friend gave me the following problem to solve. I have been stuck at it for days. With little or no progress. Well, I did get an estimated answer by running a simulation but not the formal solution.
Two players are playing a game of football. The goals are located at positions $0$ (Player A) and $100$ (Player B), and the ball is initially at position $50$.
In one move, a player draws a number from the uniform random distribution $(0, 100)$ and kicks the ball by the same amount towards the other player's goal post.
If at any point the ball crosses a goal post the game ends and the player who made the last move wins. Find the probability of player A winning.
Edit:
I tried creating an infinite series of probabilities of winning in each move like in the first move there is a 50% chance that Player A wins. This quickly turned into a integral starting at the second move, i.e $ \int_x x * P(player-B's-win | ball-is-at x) * P(ball-at-x) \;\mathrm{d}x$
The answer, somewhat surprisingly, is
$${\cos(1/2)+\sin(1/2)\over1+\sin(1)}\approx0.7369152768$$
Let's normalize the football field to total "yardage" $1$, and suppose Player A has a distance $x$ to the endzone. If they kick the ball a random distance $k$, they will win with certainty if $k\ge x$ and with probability $1-P(1-x+k)$ if $k\lt x$, where $P(1-x+k)$ represents the probability that Player B wins if the ball lands short of the endzone, setting up B's attempt from a distance $1-x+k$ to the opposite endzone. Thus
$$P(x)=1-x+\int_0^{1-x}(1-P(1-x+k))dk=1-\int_0^{1-x}P(1-x+k)dk=1-\int_{1-x}^1P(u)du$$
It follows that $P'(x)=-P(1-x)$, hence
$$P''(x)=P'(1-x)=-P(x)$$
which means $P(x)=A\cos x+B\sin x$ for some coefficients $A$ and $B$. Now $P(0)=1$ (i.e., Player A is guaranteed a win when there's no distance to kick). Thus $A=1$, so it remains to find $B$. The equation
$$-\sin x+B\cos x=P'(x)=-P(1-x)=-(\cos(1-x)+B\sin(1-x))$$
which holds for all $x$, tells us, on setting $x=0$, that
$$B=-\cos1-B\sin1$$
so $B=-\cos1/(1+\sin1)$ and thus
$$P(x)=\cos x-{\cos1\over1+\sin1}\sin x={\cos x+\sin(1-x)\over1+\sin1}$$
Plugging in $x=1/2$ gives the aforementioned result.
Remark (added later): I really was surprised at the form of the answer; I can't recall ever seeing the sine and cosine of $1$ (and $1/2$) arise so naturally in a probability setting before. Incidentally, if you want to know where Player A should start from so that $P(x)=1/2$, the answer turns out to correspond to
$$\cos x={1+\sin1+\sqrt{(1-\sin1)(7-\sin1)}\over4}\approx0.707388183$$
or $x=\arccos(0.707388183)\approx0.785000122$. That is, to make the contest fair, Player A should make the first kick from ever so slightly inside their own twenty-two-and-a-half yard line.