Points A and B lie on a circle, centre O, radius 5 cm. Find the value of angle AOB that produces a maximum area for the triangle AOB.

This is my work and attempt:

So I will describe my diagram. It is a circle, with a triangle inside (not right angled) in the middle of the circle is a dot labelled O. From here I randomly drew point A and point B, on the edge of the circle and then connected points AOB to form a triangle in the circle. Side OB will be labelled 5 cm as well as AO for radius.

Then in the middle of AB i chopped it in half and drew a line down the middle to point O to form two right angled triangles.

Now I can begin:

cosx=a/h

cosx=a/5

5cosx=a

sinx=o/h

sinx=o/5

5sinx=o

Max area of triangle

A=0.5 b h

=(0.5) 5cosx (5sinx)

=12.5(cosxsinx)

A'=-12.5(sin^(2)x-cos^(2)x)

A'=0 when x=pi/4

But this is only half of theta or angle O, so times two.

pi/4 x 2

=pi/2

Now this answer is correct with the back of the book BUT It doesn't work so well because when i plug it back into my area formula, it turns out the angle is 0.. which cannot be max?

A(0)=0

A(pi/2)=0

So my area formula must be wrong.

What is wrong from my work and how do i fix it? demonstrate.