I need to maximize the function $f(x,\theta) =x\sin\theta(xcos\theta + w - 2x)$ which defines the area enclosed by a folded plate that forms a canal, where $w$ is the length of the plate, $x$ is the length of each folded piece, $w - 2x$ is the length of the part that isn't folded and $\theta$ is the angle at which the plate is folded.
So I already found the partial derivatives of the function, which are $ f_{x} = \sin\theta(2x\cos\theta +w- 4x) $ $ f_{\theta} = x[x\cos(2\theta) + \cos\theta(w-2x)] $
And I have to solve the system $ \sin\theta(2x\cos\theta +w- 4x) = 0 $ $ [x\cos(2\theta) + \cos\theta(w-2x)] = 0 $ but I have no idea how to start. The only solution I could find was $x = 0$ and $\sin\theta = 0$, but this solution is obviously useless because then it wouldn't be a canal but a flat unfolded plate.