Determine the value of $p(1) + q(1)$

Let $p(z)$ and $q(z)$ ($z$ here is a complex number) both as polynomial so that $$p(z) \sin^2 z + q(z) \cos^2 z = 2. \quad \forall z \in \mathbb{C}$$ Determine the value of $p(1) + q(1)$.

My attempt: First I tried to manipulate the equation by using trigonometric identity to make $\tan z$ appear in it, but seems lead no result. Factorizing also gives no result, I think. So, do you have any idea? Please, help.

• Try plugging in things. For example, let $z=0, \pi, 2\pi, \ldots$. – Bob Jones Feb 9 '18 at 4:55

As suggested in the comments above, let's try plugging in $z = n\pi$, where $n$ is an arbitrary integer. Then we see that $$q(n\pi) = 2$$ for all $n$. Thus $q(z)$ is $2$ at an infinite number of locations. The only finite polynomial function that can satisfy this is $q(z) = 2$.

Similarly, plug in $z = \frac{\pi}{2} + n\pi$ to yield $$p\left(\frac{\pi}{2} + n\pi\right) = 2$$ for all integer $n$. By the same argument, $p(z) = 2$. Therefore $p(1) + q(1) = 2 + 2 = 4$.

Edit, to clarify:

We have proven that $q(n\pi) = 2$ for any integer $n$. Since there are an infinite number of integers $n$, this means that we have shown that there are an infinite number of values of $z$ which satisfy $q(z) = 2$. Since any non-constant polynomial $f(z)$ satisfies $$\lim_{z\rightarrow \pm\infty} f(z) = \pm\infty\, ,$$ it can only take any given value a finite number of times. Thus $q(z)$ must be a constant. Since we know that (for instance) $q(0) = 2$, we must have $q(z) = 2$ for all $z$.

• Please, can you explain "$q(z)$ is 2 at an infinite number of locations. The only polynomial function that can satisfy this is $q(z) =2$. I understand this sentences. Thanks. – Shane Dizzy Sukardy Feb 9 '18 at 5:41
• I mean "I don't understand these" – Shane Dizzy Sukardy Feb 9 '18 at 5:42
• @ShaneDizzySukardy See edit. – John Barber Feb 9 '18 at 6:28
• Alright, thank you very much – Shane Dizzy Sukardy Feb 9 '18 at 6:32
• @JohnBarber Sorry, but your edit doesn't clarify it that much. The better argument is that $\,q(z)-2\,$ has infinitely many roots, but any non-zero polynomial has at most $\deg(q)$ roots by the FTA. – dxiv Feb 9 '18 at 6:34

Hint: $$p(z) \sin^2 z + q(z) (1- \sin^2 z) = 2 \\ \sin^2(z) (p(z)-q(z))=2-q(z)$$ Since the LHS has infinitely many solutions, so does the rhs.