How do we get the imaginary part?

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Imaginary
Click For Summary

Discussion Overview

The discussion revolves around the mathematical problem of solving the differential equation $y''+y=\frac{1}{\cos x}$ with specified boundary conditions. Participants explore the implications of treating functions as real versus complex, particularly in relation to the natural logarithm and its impact on the solution.

Discussion Character

  • Technical explanation, Debate/contested, Mathematical reasoning

Main Points Raised

  • One participant presents a solution using the Green function, leading to a specific expression for $y(x)$.
  • Another participant notes that Wolfram treats functions as complex, which affects the interpretation of the natural logarithm.
  • There is a discussion on the integration of $\frac{dx}{x}$, highlighting the difference between real and complex functions and their respective domains.
  • Participants discuss the multivalued nature of the logarithm in complex analysis, leading to a different interpretation of the logarithmic terms in the solution.
  • A participant questions whether their result is correct if functions are not treated as complex, to which another participant affirms the correctness of their result under that assumption.
  • There is acknowledgment that Wolfram's answer may be incomplete due to the omission of certain terms related to the complex logarithm.

Areas of Agreement / Disagreement

Participants express differing views on whether the functions should be treated as complex, leading to multiple interpretations of the solution. While some affirm the correctness of the original result under real function assumptions, others emphasize the implications of complex analysis.

Contextual Notes

The discussion highlights the limitations of treating logarithmic functions in different domains and the potential for incomplete solutions when not considering the multivalued nature of complex logarithms.

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)
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
5K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 52 ·
2
Replies
52
Views
8K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K