MHB How do we get the imaginary part?

  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Imaginary
evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

We have this: $y''+y=\frac{1}{\cos x} , y'(0)=0, y(\pi)=0$.

Using the Green function I got that $y(x)= x \sin x+ \cos x( -\ln |\cos \pi|+ \ln |\cos x|)=x \sin x+ \cos x (\ln |\cos x|)$.

But according to Wolfram: y'''''''+'y'='1'/'cosx , y''''('0')''='0, y'('pi')''='0 - Wolfram|AlphaHow do we get the imaginary part?
 
Physics news on Phys.org
evinda said:
Hello! (Wave)

We have this: $y''+y=\frac{1}{\cos x} , y'(0)=0, y(\pi)=0$.

Using the Green function I got that $y(x)= x \sin x+ \cos x( -\ln |\cos \pi|+ \ln |\cos x|)=x \sin x+ \cos x (\ln |\cos x|)$.

But according to Wolfram: y'''''''+'y'='1'/'cosx , y''''('0')''='0, y'('pi')''='0 - Wolfram|Alpha

How do we get the imaginary part?

Hey evinda! (Smile)

Wolfram always treats functions as complex functions.
That has in particular impact on the natural logarithm.

Consider that if we're talking about real functions that we actually have:
$$
\int \frac{dx}{x} = \begin{cases}\ln(x) + C_1&\text{if }x>0 \\ \ln(-x) + C_2&\text{if }x<0\end{cases}
$$
That's because the domain is split into 2 disconnected intervals for which we have independent integration constants.
This is usually written as:
$$\int \frac{dx}{x} = \ln|x| + C$$
with the understanding that the integration constant $C$ can be different on each part of the domain. (Nerd)

However, with complex functions there is no such distinction - all of the domain is connected with only an undefined point at $z=0$. That is:
$$
\int \frac{dz}{z} = \ln z + C
$$
Furthermore, $\ln z$ is a so called multivalued function that behaves a bit different than a normal function.
That is, we can't just take the natural logarithm of a complex number. (Sweating)So instead of:
$$
-\ln|\cos\pi| + \ln|\cos x|
$$
we really have something like:
$$
-\ln(\cos\pi) + \ln(\cos x) = \ln\frac{\cos x}{\cos\pi} = \ln(-\cos x)
$$

Now let's define $z = \ln(-\cos x)$, so that we have $e^z = -\cos x$.
Since we're talking about complex numbers, we can write this as:
$$e^{z+2\pi ik} = -\cos x
\quad\Rightarrow\quad e^{z+i\pi+2\pi ik} = \cos x
\quad\Rightarrow\quad z+i\pi+2\pi ik = \ln(\cos x)
\quad\Rightarrow\quad z = \ln(\cos x)-i\pi-2\pi ik
$$
(Whew)
 
I like Serena said:
Hey evinda! (Smile)

Wolfram always treats functions as complex functions.
That has in particular impact on the natural logarithm.

Consider that if we're talking about real functions that we actually have:
$$
\int \frac{dx}{x} = \begin{cases}\ln(x) + C_1&\text{if }x>0 \\ \ln(-x) + C_2&\text{if }x<0\end{cases}
$$
That's because the domain is split into 2 disconnected intervals for which we have independent integration constants.
This is usually written as:
$$\int \frac{dx}{x} = \ln|x| + C$$
with the understanding that the integration constant $C$ can be different on each part of the domain. (Nerd)

However, with complex functions there is no such distinction - all of the domain is connected with only an undefined point at $z=0$. That is:
$$
\int \frac{dz}{z} = \ln z + C
$$
Furthermore, $\ln z$ is a so called multivalued function that behaves a bit different than a normal function.
That is, we can't just take the natural logarithm of a complex number. (Sweating)So instead of:
$$
-\ln|\cos\pi| + \ln|\cos x|
$$
we really have something like:
$$
-\ln(\cos\pi) + \ln(\cos x) = \ln\frac{\cos x}{\cos\pi} = \ln(-\cos x)
$$

Now let's define $z = \ln(-\cos x)$, so that we have $e^z = -\cos x$.
Since we're talking about complex numbers, we can write this as:
$$e^{z+2\pi ik} = -\cos x
\quad\Rightarrow\quad e^{z+i\pi+2\pi ik} = \cos x
\quad\Rightarrow\quad z+i\pi+2\pi ik = \ln(\cos x)
\quad\Rightarrow\quad z = \ln(\cos x)-i\pi-2\pi ik
$$
Note that Wolfram's answer is actually incomplete, since it leaves out the $2\pi i k$. (Whew)

I see... (Yes)

But if we do not treat functions as complex functions, my result is correct, right?
 
evinda said:
I see... (Yes)

But if we do not treat functions as complex functions, my result is correct, right?

Yes.
We can verify (and we should) by filling it in in the original equation, and by also checking the boundary conditions. (Nerd)
 
I like Serena said:
Yes.
We can verify (and we should) by filling it in in the original equation, and by also checking the boundary conditions. (Nerd)

Ok... Thank you! (Smile)
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...

Similar threads

Replies
11
Views
3K
Replies
36
Views
4K
Replies
5
Views
3K
Replies
1
Views
1K
Replies
3
Views
2K
Replies
52
Views
7K
Back
Top