Ball hits curve of same curvature I was doing some physics problems for homework and, while procrastinating, I came up with a theoretical scenario that I couldn't figure out the result of.

The following is from a side view and in a frictionless, ideal environment:
A ball moves toward a wall at a constant velocity. At the bottom of the wall, connecting the wall and the floor, there is a curve with the same radius as the ball (i.e. the wall and floor form two sides of a rectangle with rounded corners). What will happen when the ball comes into contact with the wall? Will it bounce off the wall like the curve isn't there, or will it roll up the wall?


 A: The ball will bounce away at an initial angle of 64.96° to the horizontal.
At the point of contact, the incident force is distributed over the lower right quadrant of the ball; a reasonable assumption is that the incident force (and thus the impulse) at a point is proportional to the cosine of the angle between the incident velocity and the surface normal (so zero at the base of the ball, rising to its greatest amount at the right side of the ball). Integrating and discarding constant factors (since we only care about the direction of the net impulse), we get:
$$ J = \int_0^{\pi/2}\begin{pmatrix}\cos^2\theta \\ \cos\theta \sin\theta \end{pmatrix} d\theta
\propto \int_0^{\pi/2}\begin{pmatrix}\cos 2\theta + 1 \\ \sin 2\theta \end{pmatrix} d\theta
\propto \left[\begin{pmatrix}\sin 2\theta + 2\theta \\ -\cos 2\theta \end{pmatrix} \right]_0^{\pi/2}
\propto \begin{pmatrix}\pi \\ 2 \end{pmatrix}
$$
This net impulse then has an angle to the horizontal of $\arctan 2/\pi = 32.48°$.
By conservation of energy (since the collision is ideal) the ball must exit with a speed equal to its incoming speed, so by parallelogram addition of vectors the angle to the horizontal of the change in velocity is half that of the exit velocity, so the exit angle must be $2 \arctan 2/\pi = 64.96°$ to the horizontal.
A: This can be answered by considering the extreme cases 


*

*The ball is always in contact with the floor at a single point with normal reaction from the wall acting in direction opposite to that of the ball. This case would arise (at the time of hitting the wall) I when the radius of curvature there is smaller than that of the ball. 

*The ball is always in contact with the surface and has a single point of contact with the normal reaction always being perpendicular to that of the direction of motion. This case would arise (at the time of hitting the wall) I when the radius of curvature there is greater than that of the ball. 
Now the case you specified is an intermediate one where normal reaction is acting in perpendicular as well as opposite direction to the motion hence the ball would fly off from the wall at an angle of $45°$ from the horizontal. 
A: You don't get an answer in an ideal world. This is the boundary between 2 different outcomes. The answer depends on details that have been idealized away. 
When a ball hits an obstacle, it deforms. Likewise, the wall is deformed at least a little by the ball. These changes in shape don't matter much for the first two cases, but they can have a bigger impact in the following scenario; 
Suppose the ball squashes horizontally and becomes taller. That will tend to lift the ball. Also the ball will spring back as it regains its shape. 
--- Edit
In response to Lamar Latrell and Graham I would like to make a point that various comments and answers have alluded to. The first two cases have different behaviors. 
When a ball bounces off the wall, the interaction takes place over a very short time. The force is very large. The ball deforms and springs back hard enough to fly off the wall. In the case of an elastic collision, it springs back with the same velocity. This is often ignored when people are only interested in the final velocity. It is abstracted away as an instantaneous collision.
When a ball slides up a gentle curve, the interaction takes much longer. Forces are relatively gentle, and deformation is smaller. The spring back is approximately $0$. The normal forces from the wall slow the ball and lift it.
When the radius of corner is slightly larger than the ball, deformations become important. The point of contact might quickly shift from bottom to side. But it might also expand from a point to a patch. You have to think in 3 dimensions. A sphere is rolling up a cylinder. The patch has area, not just length.
When the radii match, the point of contact definitely becomes a patch of at least 90 degrees. It also flattens onto the wall. 
Forces depend on the degree of flattening. Some forces will be upward. It depends on details like the shape of the patch. This is controlled by properties of the ball. 
In an ideal world, the ball is approximated as infinitely rigid. In that case, you might apply normal forces along a line of contact all at once as AccidentalTaylorExpansion and others have done (+1). But you should not be surprised if a better model of the interaction gives a different answer. In particular, the normal forces do not directly cause the ball to fly off the wall. They cause deformation, and internal forces in the ball cause it to spring back into shape and fly off. 
A: If you want to make your life more complicated sit down and buckle up because I'm going full in.
First we must take a look at how the ball bounces back in the first place, since this is rather tricky for instant bounces. Consider the following situtation:

A ball with some initial momentum $\vec p$ moves to the right and hits a slope. Let's ignore gravity for now because this problem is going to be complicated enough. During the collision a force will act on the ball and we don't how that force looks exactly, but we know two things


*

*The force is a normal force, so during the collision the force will be along a line joining the contact point and the center of the ball (see the red arrow in the picture)

*Energy will be conserved (ideal environment) so $|\vec{p}\,'|=|\vec p|$ where $\vec p\,'$ is the momentum after the collision. 


From this we can conclude the momentum will change in the following way:

The momentum is rotated by $2\theta$ since $\Delta p$, the red arrow, has to be parallel to the normal force. Now apply this to the two edge cases you mentioned to see this makes sense. For the head on collision we have $\theta=\pi/2$ so the momentum will be rotated by $\pi$. This means the particle will bounce back directly like expected. For the case with the large arc we have a continuously varying curve. Let's break up the curve in many line segments and take the limit towards a continuous curve. In this limit the angle between two sections goes to zero so the angle at which the ball bounces away also goes to zero. The ball keeps hugging the curve like expected.
Now let's look at the case where radius of curvature equals the radius of the ball. This case is tricky and we have to make some choices. Let's consider a short time interval during which the collision happens. The entire lower-right quarter of the ball experiences a force at the same time, but we don't actually know how this force is distributed. I'll make the following assumption so we can actually calculate something: the force at each contact point is proportional to $\hat r\cdot\vec v$, where $\vec r$ is the vector joining the center of the ball and the contact point and $\hat r=\tfrac 1 r\vec r$. The force is also in the direction of $\hat r$ since it is a normal force. Convince yourself that this agrees with the case I mentioned first. I define $\phi$ such that $\phi=0$ at the right-most contact point and $\phi=\pi/2$ at the lowest contact point.
The total change in momentum can now be written as an integral over all the contact angles ($\phi$). Since we don't know the exact magnitude yet I introduce a factor $c$ to be determined later.
$$\Delta \vec p\propto\int (-\hat r\cdot \vec v)\hat r\mathrm{d}\phi\\
=c\int_0^{\pi/2} (-\cos\phi)\begin{pmatrix}\cos\phi\\-\sin\phi\end{pmatrix}\mathrm{d}{\phi}\\
=c\begin{pmatrix}-\pi/4\\1/2\end{pmatrix}$$
The last line used $$\int_0^{\pi/2}-\cos^2(\phi)\,\mathrm{d}\phi=-\pi/4,\int_0^{\pi/2}\cos(\phi)\sin(\phi)\,\mathrm{d}\phi=1/2$$
To determine $c$ I use conversation of enery again. So $|\vec p+\Delta \vec p|=|\vec p|$. Plugging this equation for $c$ in Mathematica gives
$$c=\frac{8\pi mv}{4+\pi^2}.$$
An ugly expression, but an answer at least. The fact that it is proportional to $\vec p$ makes the angle always the same as you will see shortly. To determine the angle between two vectors you can use 
$$\cos\theta=\frac{\vec a\cdot \vec b}{|\vec a||\vec b|}.$$
Plugging this in for $\vec p$ and $\vec p\,'=\vec p+\Delta\vec p$ finally gives (using Mathematica again I'm not crazy)
$$\theta=\arccos\left(\frac{4-\pi^2}{4+\pi^2}\right)\approx 115.037^{\circ}$$
Or about this angle:

I would like to stress again that I made some assumptions about how the force is distributed during the collision so your answer might be different if you made different assumptions. You have to make these assumptions since this problem is impossible to define exactly.

TLDR - under some assumptions you can calculate the angle at which the particle bounces back. My calculations give $115^{\circ}$ ( $65^{\circ}$ with respect to the ground)
EDIT - In the comments it was suggested that the restoring force for a particular angle is proportional to $-\cos^2\phi$ instead of $-\cos\phi$. I'm not convinced entirely but in that case the calculation comes out to be $\theta=\arccos(-3/5)\approx 2.21$ radians or $53^{\circ}$ from the ground.
A: Ok, here's my guess after a good forty seconds' thought. I think it will bounce away from the corner at an angle that will depend upon its speed. Reasoning is as follows. Assume perfect conditions, eg zero friction, perfect curvature, perfect elasticity, etc. In that case the impact will be instantaneous at all points along the lower right quadrant of the ball. The magnitude of the reaction at each point will have two components, one due to the effect of gravity the other due to the impulse of the collision. The gravitational component will be independent of the speed of the ball, the other component will increase with speed. If we assume the speed is such that the gravitational component can be ignored, then in the absence of friction the reaction must everywhere be normal to the surface of contact, ie toward the centre of the ball. The sum of the forces must therefore have an upward component and a component to the left, so the ball will recoil at some angle.
A: The ball will rise up the curve if it's horizontal velocity is not stopped or reversed. It's because if it's horizontal velocity becomes $0$ it won't be able to proceed further to climb up because of gravity. It might just for a while if the initial velocity is sufficient.

First case
Here, as you mention, it won't climb up because as soon as it hits the wall the ball will receive a force in the opposite direction (assuming elastic collision). Moreover it won't receive any net force in the vertical direction because the radius of curvature of the wall is smaller than that of the ball.

Second case
In this case, the ball will rise up because it's kind of an incline which is varying it's slope. Moreover since in this case the ball doesn't lose all its velocity in the $x$ direction at once it can move above the curve until all its potential energy is converted into kinetic energy.

Third case
Here, the ball will receive a net force which will be above the floor in the $-x$ direction as shown in the diagram. Now this force could raise the ball up but it may not be able to do so because of gravity. If there were no gravity the ball would go up and to the left.

A: To get an answer one must look at the normal contactforce distribution at the time of impact. It should be obvious that the contactforce will be the highest at the height of r on the wall and 0 at the bottom contactpoint. Inbetween those two points the force depends on the angle between the velocity and the normalvector. Since I have no information about the amplitude of the force I will neglect it.
The resulting angle if $\alpha=0$ is where the force is $0$ and $\alpha=\pi/2$ where force has its maximum can be calculated by $\beta=\frac{\int_0^{\pi/2} sin(\alpha)\alpha d\alpha}{\int_0^{\pi/2} sin(\alpha)d\alpha} =1~rad = 57.3^{\circ}$. Basicly the Ball will bounce of and fly back in the direction where it came from with an angle of $\gamma=90^{\circ}-57.3^{\circ}=32.7^{\circ}$ from the ground.
Edit: In this picture the normalforce distribution is shown and the resulting force vector at impact is also shown. The angle to the ground is $32.7^{\circ}$.
Black are the normal contact forces and red is the resulting force.

Gravitation is not included in this calculation since there is no information about the speed and the weight of the ball. But one could therefore do the same calculation and change the assumptions to be force maximum from gravity is at the maximum at $\alpha=0$ and has to be $0$ at $\alpha=\pi/2$. Therefore the resulting force vector of the gravitational contactforce has to be at $\gamma=57.3^{\circ}$.

Edit2: I forgot to take into account that gravity acts in a differnt direction then the other force. Superposition has to take this into account.
Edit3: Corrected some spelling errors and adjusted the formula above so the anwser has correct units. The formula itselfs comes from the calculation of the point of attack for a line load or distributed load. Just looking at the angle as a "normal coordinate". I also did some numerical calculations and the resultant is given as $32.52^{\circ}$
A: I think the answer is fairly simple. The ball will rise up and rises until all of its kinetic energy has been converted to potential energy. If we try to visualise, if the radius of curvature of the corner in collision is less than the radius of the ball, it will obviously collide before being able to rise up (although it might bounce due to slight deformation on collision ). Otherwise, it can rise. That should be sufficient :)
