I'm struggling with a problem, in which I want to determine initial condition (initial velocity, and angle) given that I know my ball has to reach (final velocity, location), but I want to make sure that my ball does not go through a wall. Image below is of soccer freekick, which I want to model.
so far let's say (2D model => x,z only)
$\ x'' = -kx'$
$\ z'' = -kz' - g $
Note : Assume K to be constant.
and my wall constraint are
when $\ 10 < x < 11 $ then $\ z > 10 $
And known values are
$\ x_{t_{2}} = X_{f} $
$\ z_{t_{2}} = Z_{f} $
$\ t_{0} = 0 $
How do you go from here? In actual model, there would be Magnus effect making impossible to solve analytically, is there any way to solve such systems, with constraint ? Any solution that satisfies given known should work. Only way I can think of is to brute force the solution, but I don't even think that is even possible.