8

I am trying to solve the question:

$\cos{z}+\sin{z}=2$

<p>Where $z \in \mathbb{C}$</p>

I think I know how to solve $\cos{z}+\sin{z}=-1$:

$1+2\cos^2{\frac{z}{2}}-1+2\sin \frac{z}{2}\cos{\frac{z}{2}}=0\\ 2\cos{\frac{z}{2}}(\cos{\frac{z}{2}}+\sin{\frac{z}{2}})=0$

etc... (that is, if the double angle identity holds true when the 'angle' is a complex number - I might be wrong about this)

My other methods involve:

  • trying to substitute $\cos{z}=\frac{e^{iz}+e^{-iz}}{2}$ and $\sin{z}=\frac{e^{iz}-e^{-iz}}{2i}$. This seems to be the most obvious method, but I can't work out the next step after $$e^{iz}-e^{-iz}+(e^{iz}+e^{-iz})i=4i$$

  • substituting $2=2(\sin^2{z}+\cos^2{z})$

  • substituting $\sin{z}=\cos(\frac{\pi}{2}-z)$ (again, not really sure if this can be done)

enter image description here

Did
  • 279,727
ahorn
  • 2,236
  • 1
    Hint: $a+b=2,~a^2+b^2=1$. – Lucian Sep 04 '14 at 18:09
  • Where did you get that from? – ahorn Sep 04 '14 at 18:35
  • 2
    The functional relation between the sine and cosine function holds for all values of the argument, not just real ones. Then $4=2^2=(a+b)^2=a^2+b^2+2ab=1+2ab$, from which we deduce that $ab=\dfrac32$. But now that we know their sum and their product, it follows that $\cos z$ and $\sin z$ are the roots of the equation $(t-s)(t-p)=t^2-st+p=0$, where $s=2$ and $p=\dfrac32$ are the sum and product, respectively. – Lucian Sep 04 '14 at 18:54
  • 1
    I would try using the formula $$\cos z+\sin z=\sqrt2\sin(z+\frac\pi4)$$ that holds for all complex numbers $z$ (as do the other trig identities as also pointed out by Lucian). – Jyrki Lahtonen Sep 04 '14 at 19:03

6 Answers6

10

Recall that the addition formula for cosines reads $$\cos(z+z')=\cos z\cos z'-\sin z\sin z',$$ and that, for $z'=-\pi/4$, one gets $$\cos(z-\pi/4)=(\cos z+\sin z)/\sqrt2.$$ Hence the equation to be solved is $$\cos(z-\pi/4)=\sqrt2.$$ To go further, consider $$u=\mathrm e^{\mathrm i(z-\pi/4)},$$ then $u\ne0$ and the equation above reads $$u+u^{-1}=2\sqrt2,$$ that is, $$u^2-2\sqrt2u+1=0=(u-\sqrt2)^2-1,$$ that is, $$u=\sqrt2\pm1.$$ Thus, the complex number $$\mathrm i(z-\pi/4)-\log(\sqrt2\pm1)$$ must be a multiple of $2\mathrm i\pi$, that is, finally, and since $\sqrt2\pm1$ are respective inverses, $$z=\pm\mathrm i\log(\sqrt2+1)+\pi/4+2n\pi,\qquad n\in\mathbb Z.$$ Note that here, $\log$ is the usual function logarithm defined on the positive real half-line.

Did
  • 279,727
  • 1
    very nice initial hint! – Caran-d'Ache Sep 04 '14 at 12:12
  • I don't understand why $\cos(z-\pi/4)=(\cos z+\sin z)/\sqrt2$. Is this an identity? – ahorn Sep 04 '14 at 12:22
  • 2
    It's the angle sum identity for $cos(a+b)$. $\sin(\pi/4)=\cos(\pi/4)=1/\sqrt{2}$ – Dan Uznanski Sep 04 '14 at 12:41
  • See new first sentence. – Did Sep 04 '14 at 13:57
  • How did you get $u+u^{-1}=2\sqrt{2}$? And why is $\mathrm i(z-\pi/4)-\log(\sqrt2\pm1)$ a multiple of $2i\pi$? Doesn't it equal $0$ since $u=\mathrm e^{\mathrm i(z-\pi/4)}$? – ahorn Sep 04 '14 at 18:24
  • First question: because $\cos(z-\pi/4)=(u+u^{-1})/2$. Second question: To know that $e^{w}=t$, for some $t\ne0$, is to know that $w-y$ is a multiple of $2i\pi$, for any $y$ such that $e^y=t$. For example, $e^w=1$ implies that $w$ is a multiple of $2i\pi$ (since $1=e^0$), not that $w=0$. – Did Sep 04 '14 at 18:39
1

A hint: The formula $$\cos x+\sin x=\sqrt{2}\>\sin\left(x+{\pi\over4}\right)$$ known from high-school trigonometry also holds for complex $x$.

1

Yet another answer:

First, let's recognize why we need to go to complex variables. Recalling that $\cos\frac{\pi}{4}=\sin\frac{\pi}{4}=\frac{1}{\sqrt{2}}$, we have from the cosine addition formula

$$\sin z+\cos z = \sqrt{2}\cdot\left[\sin\frac{\pi}{4}\sin z+\cos\frac{\pi}{4}\cos z\right]=\sqrt{2}\cos\left(z-\frac{\pi}{4}\right)$$ as several other answers have already noted. This has a maximum value of $\sqrt{2}$ for real $z$, so we'll need complex $z$ if we want to get a value of $2$ instead.

Keeping in mind that the closest approach for real $z$ was $z=\pi/4$, we make the substitution $z=\frac{\pi}{4}+i\tau$ with the anticipation that $\tau$ should 'mostly' be imaginary. Thus gives the equation $$\sqrt{2}\cos\left(z-\frac{\pi}{4}\right)=\sqrt{2}\cos(i\tau)=\sqrt{2}\cosh \tau=2$$ which immediately yields $\tau=\pm \cosh^{-1} \sqrt{2}$ as the principal solutions (recall that hyperbolic cosine is an even function). Thus $\boxed{z=\dfrac{\pi}{4}\pm i\cosh^{-1} \sqrt{2}+2\pi n}$ where we have taken into account the $2\pi$-periodicity of the trig functions involved.

Semiclassical
  • 15,842
0

Note that

$$\cos(\arctan(z)) + \sin(\arctan(z)) = \frac{1}{\sqrt{1+z^2}} + \frac{z}{\sqrt{1+z^2}}.$$

So, if you can solve the equation

$$\frac{1}{\sqrt{1+z^2}} + \frac{z}{\sqrt{1+z^2}} = 2,$$

(which is quadratic) then you can solve the original.

Mark McClure
  • 30,510
  • I can solve the quadratic but I do not know what to do with this to solve the original. – Did Sep 04 '14 at 13:59
  • I get $\arctan(\frac{1}{3}\pm \frac{\sqrt{10}}{3})$, but that is real, not complex. – ahorn Sep 04 '14 at 18:06
  • @ahorn I think you made a mistake in your solution of the quadratic. – Mark McClure Sep 04 '14 at 19:00
  • @Did I guess we just apply the arc tangent. – Mark McClure Sep 04 '14 at 19:01
  • $1+z=2\sqrt{1+z^2}\ 1+2z+z^2=4(1+z^2)\3z^2-2z-3=0\z=\frac{2\pm \sqrt{4+36}}{6}=\frac{1}{3}\pm\frac{ \sqrt{10}}{3}\ \arctan z=\arctan(\frac{1}{3}\pm\frac{ \sqrt{10}}{3})$ – ahorn Sep 04 '14 at 19:25
  • One problem with your answer is that $\arctan$ has period $\pi$ while the set of solutions of the original equation is $z+2\pi\mathbb Z$ for any solution $z$. – Did Sep 04 '14 at 19:28
  • @ahorn You have a mistake in your 3rd line. The $-3$ should be a $+3$. – Mark McClure Sep 04 '14 at 19:34
  • @Did Have you tried plugging the solution into the equation? You'll find that both solutions work just fine, if you do. Now I never claimed or wanted to present a full solution - the answer started as a hint. In particular, I never claimed that the solution set had period $\pi$, merely that the period is related to the period of the tangent. In squaring both sides, it's likely that some spurious solutions are introduced. – Mark McClure Sep 04 '14 at 19:40
  • Frankly, I am a bit lost by your last comment... Anyway, if $z$ solves the equation, then $z+\pi$ does not, never. And if "Taking the periodicity of the tangent into account, you get two infinite families of solutions" does not suggest the contrary, I do not know what would. – Did Sep 04 '14 at 19:44
  • @Did Have you tried plugging my solutions (the only two actually written down) into the equation? – Mark McClure Sep 04 '14 at 19:49
  • Again? Whether I did or did not does not seem to be the problem here, you know. And yes, I did (happy?). – Did Sep 04 '14 at 19:51
  • @Did And they worked - awesome! Now, $\sin(z)+\cos(z)$ has period $2\pi$ - done. :) – Mark McClure Sep 04 '14 at 19:54
  • It seems you are more interested in stonewalling your answer than discussing its validity. Too bad. When you will be decided to discuss mathematics, just call me, until then... – Did Sep 04 '14 at 20:12
  • @Did That's not true at all. Checking the solution against the original equation is quite a genuine suggestion. The original, $\sin(z)+\cos(z)$ has period $2\pi$, while the squared, $(\sin(z)+\cos(z))^2$, has period $\pi$ - thus the spurious solutions. Honestly, this is so elementary and encountered so frequently in pre-calculus, I assumed you saw it. – Mark McClure Sep 04 '14 at 20:32
  • Once again, the problem is YOUR solution and your aim should be to (try to) correct it rather than testing (rather ridiculously) those who mention problems in it. Enough for me. – Did Sep 04 '14 at 20:45
  • @Did If there is a problem with this approach, I'd love to hear it. The only "problem" that you've alleged is that the solution set has period $\pi$ but, then, I never claimed that it does. – Mark McClure Sep 04 '14 at 20:59
0

I think you were on the right track. Putting $\;z=x+iy\;,\;\;x,y\in\Bbb R\;$ :

$$e^{iz}-e^{-iz}+(e^{iz}+e^{-iz})i=4i\implies e^{-y+ix}-e^{y-ix}+\left(e^{-y+ix}+e^{y-ix}\right)i=4i\iff$$

$$e^y\left(\cos x-i\sin x+i(\cos x-i\sin x)\right)+e^{-y}\left(\cos x+i\sin x+i(\cos x+i\sin x)\right)=4i\iff$$

$$e^y\left(\cos x+\sin x\right)+e^{-y}\left(\cos x-\sin x\right)+\left[e^y\left(\cos x-\sin x\right)+e^{-y}\left(\cos x+\sin x\right)\right]i=4i$$

And thus you get two equations:

$$\begin{align*}e^y\left(\cos x+\sin x\right)+e^{-y}\left(\cos x-\sin x\right)=0\\e^y\left(\cos x-\sin x\right)+e^{-y}\left(\cos x+\sin x\right)=4\end{align*}$$

If you add\substract both equations you get

$$\cos x\left(e^y+e^{-y}\right)=2\iff\cos x\cosh x=1$$

$$\sin x\left(e^y-e^{-y}\right)=-2\iff \sin x\sinh x=-1$$

You now have two transcendental, real equations to solve

Timbuc
  • 34,191
  • Thank you. I understand your working up until you mention the word 'transcendental'. I haven't had much practice with hyperbolic trig functions. – ahorn Sep 04 '14 at 12:21
  • Forget that word: you get two equations which aren't polynomial (of course, also not linear), so the way to solve here may need of non-standard-basic-analysis stuff. – Timbuc Sep 04 '14 at 12:23
  • In your second line after the colon, you missed out a minus. $-e^{y-ix}=-e^y(\cos x - i\sin x)$ – ahorn Sep 04 '14 at 17:54
0

Now here is a purely algebraic solution. As you have noted, the problem is equivalent to $$(1 + i){e^{iz}} - (1 - i){e^{ - iz}} = 4i$$consider the new variable $x$ as ${x=e^{iz}}$in terms of the newly defined variable, the problem reads as$$(1 + i)x - {{(1 - i)} \over x} = 4i$$multiplying by $x$, we get $$(1 + i){x^2} - 4ix - (1 - i) = 0$$which is a standard second order equation. The solutions are $$x = {{4i \pm \sqrt { - 16 + 4(1 - i)(1 + i)} } \over {2(1 + i)}} = \left( {1 \pm {{\sqrt 2 } \over 2}} \right)(1 + i)$$so that $$z = {1 \over i}\ln x = - i\left( {\ln \left( {1 \pm {{\sqrt 2 } \over 2}} \right) + \ln (1 + i)} \right)$$which is hopefully what you are looking for (note that a more careful analysis in the logarithm part yields solutions in higher Riemann planes).