Thanks CaptainBlack, I appreciated the time you took to getting me closer to the solution.

The trouble is high school trig was 16 years ago, and even if I learnt trig identities, i forgot them 2 hours after the last exam. This is for a personal project I'm working on, a solar funnel. I'm not in any classes, it's a one off problem

I googled trig identities, and it may as well have been written in greek. (sight pun there)

Thanks CaptainBlack, I appreciated the time you took to getting me closer to the solution.

The trouble is high school trig was 16 years ago, and even if I learnt trig identities, i forgot them 2 hours after the last exam. This is for a personal project I'm working on, a solar funnel. I'm not in any classes, it's a one off problem

I googled trig identities, and it may as well have been written in greek. (sight pun there)

Don't bother, now you will learn the dreadfull secret of maths, when we
have a practical problem we don't usually bother with all that.

Just post the values of x and y and we will solve this numerically for you
(without tidying up the trig)

If you need to find theta for many x's and y's what we can do is observe that theta depends
on z=x/y, so we compute a table of theta against z.

what I'm hoping for is a little web page with javascript or php function to calculate theta.

so x might be 40 and y might be 50, but could be anything.

i think if x = y, theta is 90 - 45 / 2

I think the formula you are looking for is .

When x = y, this gives θ = 60°. This is certainly correct, because if x=y then the triangle formed by the sides labelled x and y, together with the long dashed red line of incident light, is isosceles (another long-forgotten word from high school?), and it's then easy to verify geometrically that its angles must be 30°, 30° and 120°.

If I make y=2 and x=200, I should get a figure close to 0, but I get 45.something.

any ideas?

The angle θ can never be less than 45°. If you look at your diagram, you'll see that if θ=45° then the vertical ray of incident light gets reflected horizontally across to the opposite rim of the funnel. If θ is less than 45° then the ray will be reflected back upwards and certainly cannot enter the funnel.