# What is the best shape for a soccer goal post?

Yes I get OB=##S\sqrt2\cos(\frac{\pi}{4}-\theta)##, next step?
Are we just considering the cases where ##d \gt S\sqrt2\cos(\frac{\pi}{4}-\theta)## but this will not give the cases when the ball goes in after deflection from the post, this was not what I was asking

Are we just considering the cases where ##d \gt S\sqrt2\cos(\frac{\pi}{4}-\theta)## but this will not give the cases when the ball goes in after deflection from the post, this was not what I was asking
I thought you calculated the probability of a shot going in after hitting the post, this was what I was originally asking, "of all the shots that hit the post which of the two posts (square or round) has a greater probability for those shots going in"

haruspex
Homework Helper
Gold Member
2020 Award
this will not give the cases when the ball goes in after deflection from the post
It will. Draw the diagram for ##\theta>\pi/2## and d just sufficient to pass to the right of A.

It will. Draw the diagram for ##\theta>\pi/2## and d just sufficient to pass to the right of A.

The blue circle is of radius ##D## and if the path of the ball is tangent to that circle (because ##d## is the perpendicular distance of the path from origin and this distance is equal to ##D## in the limiting case) it will not hit the post

View attachment 287709
The blue circle is of radius ##D## and if the path of the ball is tangent to that circle (because ##d## is the perpendicular distance of the path from origin and this distance is equal to ##D## in the limiting case) it will not hit the post
I realised you said that the limiting case is ##d=D\cos(\frac{\pi}{4}-\theta)## not ##d=D## but now I cannot understand why?
What I do understand is that ##\left|\frac{\pi}{4}-\theta\right|## is the angle between the vectors ##\vec {OA}## and ##\vec {OB}## where ##\vec {OB}## is the perpendicular distance from origin ##O## to the path of the ball and ##D\cos(\frac{\pi}{4}-\theta)## is the projection of ##\vec {OA}## on ##\vec {OB}##

I think now I somewhat understand what you are trying to do,
Here in this link the blue line gives all possible paths of the ball (move point ##B## to get different cases) and the red line is the limiting case for a given blue path.

As long as we stay to the left of the red line, we can score a goal thus these are our favourable cases.

A goal is scored if and only if the ball passes to the right of (−D,D). That is, if d>S2cos⁡(π4−θ).
Now finally I understand what you said here!

But now how did you get this?
The probability of a goal is therefore ##\frac 1{2D\pi}\int_0^\pi D-S\sqrt 2\cos(\frac{\pi}4-\theta)d\theta##
And also, please assume ##D=S\sqrt 2=R\sqrt 2## in further calculations because the diameter of the round post is equal to side length of square post according to the laws of the game

According to what I understood reading post #91, I similarly created a graphic for the circular post as well!

haruspex
Homework Helper
Gold Member
2020 Award
But now how did you get this?

And also, please assume ##D=S\sqrt 2=R\sqrt 2## in further calculations because the diameter of the round post is equal to side length of square post according to the laws of the game
There's no need to plug in S=R at the start. I prefer to keep things general initially and apply specifics at the end. There are advantages.
The value of D does not matter as long as it encompasses both posts.

We have established a goal is scored if ##d>S\sqrt 2\cos(\frac{\pi}4-\theta)##.
d is uniformly distributed over the range (-D,D), a line of length 2D. Of that line, length ##D-S\sqrt 2\cos(\frac{\pi}4-\theta)## satisfies that condition. So the probability of a goal for a given angle is ##\frac 1{2D}(D-S\sqrt 2\cos(\frac{\pi}4-\theta))##.
To get the overall probability we need to integrate over the range of the angle and divide by that range, pi.
The probability of a goal is therefore ##\frac 1{2D\pi}\int_0^\pi D-S\sqrt 2\cos(\frac{\pi}4-\theta)d\theta##.

(Love the animations!)

kshitij
There's no need to plug in S=R at the start. I prefer to keep things general initially and apply specifics at the end. There are advantages.
The value of D does not matter as long as it encompasses both posts.

We have established a goal is scored if ##d>S\sqrt 2\cos(\frac{\pi}4-\theta)##.
d is uniformly distributed over the range (-D,D), a line of length 2D. Of that line, length ##D-S\sqrt 2\cos(\frac{\pi}4-\theta)## satisfies that condition. So the probability of a goal for a given angle is ##\frac 1{2D}(D-S\sqrt 2\cos(\frac{\pi}4-\theta))##.
To get the overall probability we need to integrate over the range of the angle and divide by that range, pi.
The probability of a goal is therefore ##\frac 1{2D\pi}\int_0^\pi D-S\sqrt 2\cos(\frac{\pi}4-\theta)d\theta##.

(Love the animations!)
That is so clever!

First we calculated favourable cases for line whose slope is fixed and then we fixed the distance of that line from origin then calculated favourable cases for all possible values of slope!

But if we consider the maximum value of ##D## to be ##\infty## (i.e. the incident path can be anywhere in the 2D plane) then logically we should get the probability in case of square post as 33.33% as all three faces have equal chance of striking and striking only one of these three face leads to goal, but using your formula I get 15.91%, why?

Last edited:
According to what I understood reading post #91, I similarly created a graphic for the circular post as well!
I updated the graphic for the circular post case, now you don't have to move two points separately to get all possible paths you can get it by moving only point B in the link below,
https://www.geogebra.org/calculator/khj7d6hk

I evaluated your integral for ##\theta \in (0,\pi)## and got

##P(square)=\dfrac{D-2S}{2D\pi}##

##P(round)=\dfrac{D-2R}{2D\pi}##

Now for ##D \to \infty##, we get ##P(square)=P(round)=\dfrac{1}{2\pi}=0.1591%## regardless of what the dimensions of the square and round posts are as long as they are finite, i.e., we can even have ##R=1000S## and still get the same probability for both posts as 15.91% which seems totally illogical to me, am I missing something?

Last edited:
I evaluated your integral for ##\theta \in (0,\pi)## and got

##P(square)=\dfrac{D-2S}{2D\pi}##

##P(round)=\dfrac{D-2R}{2D\pi}##

Now for ##D \to \infty##, we get ##P(square)=P(round)=\dfrac{1}{2\pi}=15.91%## regardless of what the dimensions of the square and round posts are as long as they are finite, i.e., we can even have ##R=1000S## and still get the same probability for both posts as 15.91% which seems totally illogical to me, am I missing something?
And if we take ##D=7.32m## which is equal to the distance between the two posts and ##R=S=6cm## according to the laws of the game, we get,

##P(square)=P(round)=0.1516%##

Which still doesn't make any sense to me, I mean Probability for the square ones should be close to 33% and for the round one should be atleast 25%!

Last edited:
I evaluated your integral for ##\theta \in (0,\pi)## and got

##P(square)=\dfrac{D-2S}{2D\pi}##

##P(round)=\dfrac{D-2R}{2D\pi}##

Now for ##D \to \infty##, we get ##P(square)=P(round)=\dfrac{1}{2\pi}=0.1591%## regardless of what the dimensions of the square and round posts are as long as they are finite, i.e., we can even have ##R=1000S## and still get the same probability for both posts as 15.91% which seems totally illogical to me, am I missing something?

And if we take ##D=7.32m## which is equal to the distance between the two posts and ##R=S=6cm## according to the laws of the game, we get,

##P(square)=P(round)=0.1516%##

Which still doesn't make any sense to me, I mean Probability for the square ones should be close to 33% and for the round one should be atleast 25%!
I realised that 33% and 25% where the probabilities of a shot going in after hitting the post whereas in your method the ball doesn't need to hit the post, but now this confuses me even more! that means 15% is the probability for any shot (no matter where it is hit in the 2D plane) to go in!

So now suddenly 15% changes from being a little less than expected to a lot more than expected

Well I'm too confused so let me state what I think I understood then you correct me where I'm wrong.
• ##d## is the distance of a given path of the ball from origin and origin is the center of one of the posts (right post from our point of view and left from the ball's) and the maximum value of ##d## is equal to the maximum value of ##D##
• ##D## is all possible values of the distance of the path of the ball from origin starting from the edge corner of one post to the edge corner of other (the other post was at ##(-\infty,0)##)
• ##\theta## is the inclination of the path with x-axis or the goal line which ranges from ##(0,\pi)##
• A goal is scored if the ball passes to the left (looking at the ball from our point of view its left otherwise w.r.t ball it should be right) of the minimum value of ##D##
• for scoring a goal we have, ##d>S\sqrt 2\cos(\frac{\pi}4-\theta)## in case of square post and in case of round one we get ##d>R\cos(\frac \theta 2)## (##R## is the radius of round post and ##2S## is the side length of square one)
And the points below are the ones that I concluded from the points above,
• the value (here I am only talking about the magnitude) of ##D## can range from ##(R,\infty)## or ##(S\sqrt{2},\infty)## if we consider the other post to be at ##\infty##, and if we considered a more realistic system then value of then maximum value of ##D## must be equal to the distance of the left (again its left w.r.t us and right w.r.t ball) touchline from the edge of the right post
• Since a line is bidirectional and not unidirectional like the path of the ball, we can consider goal posts at both ends of the pitch so along path of the ball the ball can travel both ways backwards or forwards and scoring a goal at both ends of the pitch is equivalent for us

Last edited:
haruspex
Homework Helper
Gold Member
2020 Award
D is all possible values of the distance of the path of the ball from origin starting from the edge corner of one post to the edge corner of other (the other post was
No, D is a constant such that if d>D then it is sure to be a goal without touching the post. Likewise, if d<-D it surely will not be a goal. D's value won't matter as long as it is large enough.
We only need to compare the posts for what happens when -D<d<D.

No, D is a constant such that if d>D then it is sure to be a goal without touching the post. Likewise, if d<-D it surely will not be a goal. D's value won't matter as long as it is large enough.
We only need to compare the posts for what happens when -D<d<D.
So ##D## is a large constant and ##d## belongs to ##(S\sqrt 2\cos(\frac{\pi}4-\theta),D)## for square post and for round post it lies between ##(R\cos(\frac \theta 2),D)##

So still, when ##D \to \infty## it should surely give us the probability when the path of the ball can lie anywhere in the 2D plane because now ##d## belongs to ##(S\sqrt 2\cos(\frac{\pi}4-\theta),\infty)##, so still, 15% is the probability of any shot in the 2D plane going in, right?

haruspex
Homework Helper
Gold Member
2020 Award
So ##D## is a large constant and ##d## belongs to ##(S\sqrt 2\cos(\frac{\pi}4-\theta),D)## for square post and for round post it lies between ##(R\cos(\frac \theta 2),D)##

So still, when ##D \to \infty## it should surely give us the probability when the path of the ball can lie anywhere in the 2D plane because now ##d## belongs to ##(S\sqrt 2\cos(\frac{\pi}4-\theta),\infty)##, so still, 15% is the probability of any shot in the 2D plane going in, right?
I don't know how you get 15%.
If D goes to infinity and d is still uniformly distributed from somewhere up to that then the probability of going in tends to 1.

I don't know how you get 15%.

I evaluated your integral for ##\theta \in (0,\pi)## and got

##P(square)=\dfrac{D-2S}{2D\pi}##

##P(round)=\dfrac{D-2R}{2D\pi}##

Now for ##D \to \infty##, we get ##P(square)=P(round)=\dfrac{1}{2\pi}=0.1591%##

haruspex
Homework Helper
Gold Member
2020 Award
##\frac 1{2D\pi}\int_0^\pi D-S\sqrt 2\cos(\frac{\pi}4-\theta)d\theta##
##=\frac 1{2D\pi} [D\theta+S\sqrt 2\sin(\frac{\pi}4-\theta)]_0^\pi##
##=\frac 1{2D\pi} (D\pi+S\sqrt 2\sin(\frac{\pi}4-\pi)-S\sqrt 2\sin(\frac{\pi}4))##

##\frac 1{2D\pi}\int_0^\pi D-S\sqrt 2\cos(\frac{\pi}4-\theta)d\theta##
##=\frac 1{2D\pi} [D\theta+S\sqrt 2\sin(\frac{\pi}4-\theta)]_0^\pi##
##=\frac 1{2D\pi} (D\pi+S\sqrt 2\sin(\frac{\pi}4-\pi)-S\sqrt 2\sin(\frac{\pi}4))##
Oh yes I forgot the ##\pi## in the numerator but now the probability is 50% right?

I evaluated your integral for ##\theta \in (0,\pi)## and got

##P(square)=\dfrac{D-2S}{2D\pi}##

##P(round)=\dfrac{D-2R}{2D\pi}##

Now for ##D \to \infty##, we get ##P(square)=P(round)=\dfrac{1}{2\pi}=0.1591%## regardless of what the dimensions of the square and round posts are as long as they are finite, i.e., we can even have ##R=1000S## and still get the same probability for both posts as 15.91% which seems totally illogical to me, am I missing something?
*correction,

##P(square)=\dfrac{D\pi-2S}{2D\pi}##

##P(round)=\dfrac{D\pi-2R}{2D\pi}##

Now for ##D \to \infty##, we get ##P(square)=P(round)=\dfrac{1}{2}=0.5##

haruspex
Homework Helper
Gold Member
2020 Award
*correction,

##P(square)=\dfrac{D\pi-2S}{2D\pi}##

##P(round)=\dfrac{D\pi-2R}{2D\pi}##

Now for ##D \to \infty##, we get ##P(square)=P(round)=\dfrac{1}{2}=0.5##
Yes, in post #118 I meant d being from 0 to infinity. That would give 1.

It depends what you are trying to do here. Initially you were asking what the probability of a goal is given that the ball hits the post. You can answer that by making D a variable depending on the angle. But that means a) you are changing the distribution of angles, making shots at 45 degrees relatively more common than ones full on, and b) you cannot use it to compare the two post shapes.
To compare the posts you must set D to a constant finite value large enough to encompass both posts from all angles. This will not give an actual probability of a goal in either case, but it does tell you what the difference between them is.

Yes, in post #118 I meant d being from 0 to infinity. That would give 1.

It depends what you are trying to do here. Initially you were asking what the probability of a goal is given that the ball hits the post. You can answer that by making D a variable depending on the angle. But that means a) you are changing the distribution of angles, making shots at 45 degrees relatively more common than ones full on, and b) you cannot use it to compare the two post shapes.
To compare the posts you must set D to a constant finite value large enough to encompass both posts from all angles. This will not give an actual probability of a goal in either case, but it does tell you what the difference between them is.
Again I can't understand what you mean here, how am I changing the distribution of angles? And why can't this be used to compare the two post shapes?

Let me state the whole method as I understand it.

Now, I need diagrams and figures to understand pretty much everything so I will now talk w.r.t to the diagrams in the links below.

Square post Circular post

We assumed a path of shot whose angle with the goal line is ##\theta## and distance from center of one of the posts is ##d##

As we can see that moving point ##B## changes both the distance of path of the ball from the center of the post and its angle with the goal line.

(Note that distance to the left side of the post in the figures are taken -ve)

And we assumed the other post to be at distance ##(-\infty)## from our post in the figure, so our total values of ##d## ranges from ##(-D,D)## where ##D## is a large enough constant and the favourable values of ##d## ranges from ##(-D,-S\sqrt 2\cos(\frac{\pi}4-\theta))## in square post and ##(-D,-R\cos(\frac \theta 2))## in round post.

So now for a given value of ##\theta## our required probabilities are,

##P(square)=\dfrac{d \space \text{(favourable)}}{d \space \text {(total)}}=\dfrac{D-S\sqrt 2\cos(\frac{\pi}4-\theta)}{2D}##

##P(round)=\dfrac{d \space \text{(favourable)}}{d \space \text {(total)}}=\dfrac{D-R\cos(\frac \theta 2)}{2D}##

Now this was for a given ##\theta## but we also have ##\theta \in (0,\pi)## and thus we got,

##P(square)=\frac 1{2D\pi}\int_0^\pi D-S\sqrt 2\cos(\frac{\pi}4-\theta)d\theta##

##P(round)=\frac 1{2D\pi}\int_0^\pi(D-R\cos(\frac\theta 2))d\theta##

Now in this method we calculated the probability assuming uniform distribution of ##d## from ##-D## to ##D## and uniform distribution of ##\theta \in (0,\pi)##

Now, if we want to compare the posts we can take the value of ##D=S\sqrt2=R## (as it doesn't matter what value of ##D## we take as long as its larger than or equal to ##S\sqrt2=R##)

So finally we get that if ##\theta \in (0,\pi)## then, the probabilities for a shot (whose distance from the center of the post is equal to or less than ##|D|##) going in for both posts are equal to ##\dfrac{\pi-2}{2\pi}=0.1816##

That is, both posts are equivalent as long as a shot's angle with the goal line is between ##(0,\pi)## and distance from the center of the post is less than or equal to ##|D|##

jbriggs444