Things to Reconsider: The Integral of \(\frac{1}{x}\)

Absolute Absolutes?

Consider the following integral:

\[\int \frac{1}{x}\,dx = \log_e|x| + C\]

When learning this integral, teachers often stress the need to include the absolute value signs. The reasoning behind this is often to do with the fact that the logarithm of a negative number is undefined.

However, is it really necessary to add the absolute value signs? The basis of this document is to discover the answer to this question and in the process, question some habits in the teaching and learning of Mathematics.

Unclear Domain Habits

Consider the following equation:

\[ x^2=-1 \]

Before learning about the existence of the imaginary unit \(i\), the answer to this equation is simply: there is no real solution for \(x\). However, after learning about \(i\), many students can now proudly announce that the answer is \(x=\pm i\), as if they have some new esoteric knowledge that separates them from the rest of those still stuck in the real field.

For these two types of students, those who are aware of the complex numbers and those who are not, this equation is intepreted very differently. There is a solution for \(x\) if \(x\in \mathbb{C}\) but there isn’t a solution for when \(x \in \mathbb{R}\). So which answer do we really accept?

If a Mathematics Extension 2 student was asked to solve this equation in an examination and simply wrote that there is no real solution, is he correct? Similarly, if a student from Year 10 wrote the answer \(x=\pm i\), will he be penalised for learning something ahead of his course?

My argument for these cases is that the fault is not with the students at all. The fault lies with the question.

The question fails to define the variable \(x\).

 

In order for it to be absolutely clear, the question needs to be rewritten as follows:

\[\mbox{Solve for }x\in \mathbb{C}: x^2 = -1\]

Now it would be rather annoying to always define the variable for which we are solving for, so usually we just assume it to be \(\mathbb{C}\) or \(\mathbb{R}\) depending on which course the student is taking. I think we need to stop making this assumption and at the very least start examination papers, worksheets, textbooks and questions with disclaimers, such as: “For all questions, \(x \in \mathbb{R}\)” or “For all questions, the domain of \(f(x)\) is a subset of \(\mathbb{R}\)”. We need to clearly define the domain in which the questions lie!

Interesting Questions

When we clearly define domains in which the question’s solution is to be given in, some more interesting questions arise. Here are some examples:

 

  • Solve for \(x\in \mathbb{N}: x^2+2x=0\)

A discussion in whether \(0\in\mathbb{N}\) will result from this question. Depending on which school of thought the student is in, this question could yield zero solutions or one solution.

  • Solve for \(x\in \mathbb{Q}: 2x^2+3x+1=0\)

Would a question like this make students more aware of checking that their solution makes sense? For \(x\in\mathbb{R}\), there will two solutions but for \(x\in\mathbb{Q}\), there is only one!

  • Factorise \(x^4-9\) over \(\mathbb{Q},\mathbb{R},\mathbb{C}\)

To factorise over three different types of numbers will yield three different results. Is the student who factorised over \(\mathbb{Q}\) rather than \(\mathbb{R}\) less deserving of full marks? This would not be an issue if the domain was specified.

  • For \(f: \mathbb{R}\rightarrow\mathbb{C}\) such that \(f(x)= \sqrt{x}\), evaluate \(f(-4)\).

Without defining the domain and codomain of the function, it actually won’t make sense to ask the value of \(f(-4)\). The clarity of such a task is not apparent until the function’s domain and codomain is specified.

This is why I generally dislike questions that ask “what is the domain of the function…” because they inherently don’t make sense due to this issue. What they mean to ask is “what is the maximal possible domain of the function as a subset of \(\mathbb{R}\)”.

The Integral of \(\frac{1}{x}\)

Consider the following:

\[\begin{align*}y&=\log_e(-x)\quad \mbox{ for } x<0\\\frac{dy}{dx}&=\frac{-1}{-x}\\&= \frac{1}{x}\end{align*}\]

With this argument, it will then be enough to justify the need for absolute values in the integral:

\[\int\frac{1}{x}\,dx=\log_e|x|+C\]

This seems all fine until we realise that we have made an assumption on the function \(\log_e(x)\).

If we make the assumption that \(\log_e(x)\) has a real valued range then the absolute signs are definitely required. However, without any explicit definition of this case, then the same scenario as the \(x^2=-1\) equation arises: Who is more correct – the student who works in \(\mathbb{R}\) or the one who works in \(\mathbb{C}\)?

If we define the domain and codomain/range of \(\log_e(x)\) to be \(\mathbb{C}\), then something very interesting happens.

Logarithms of Negative Numbers

Leonard Euler discovered that for any \(x\in\mathbb{R}\),

\[e^{ix}=\cos x + i\sin x\]

This is known as Euler’s formula (not to be confused with the Euler Characteristic Formula \(V+F=E+2\)).

If we let \(x=\pi\), then \(e^{i\pi}=\cos\pi+i\sin\pi=-1\) and this results in the famous identity: \[e^{i\pi}+1=0\]

Now let us consider the following for the function \(\mathbb{C}\rightarrow\mathbb{C}:\log_e(z)\). Also recall that for any \(z\in\mathbb{C}\) that \(z = r(\cos x + i\sin x)\) where \(x = \arg z\) and \(r=|z|\).

\[\begin{align*}\log_e(z) &=\log_e(r(\cos x + i\sin x))\\&=\log_e(re^{ix})\\&=\log_e(r)+\log_e(e^{ix})\\&=\log_e(r)+ ix\\\end{align*}\]

Therefore:

\[\log_e(z) = \log_e|z| + i\arg z\]

Now because any number \(z\in\mathbb{C}\) technically has an infinite number of arguments separated by multiples of \(2\pi\), then there are also technically an infinite number of complex logarithms. This has some interesting applications:

Solve for \(z\in\mathbb{C}: e^z=-1\)

\[\begin{align*}z&=\log_e(-1)\\&=\log_e|-1|+i\arg (-1)\\&=i\arg (-1)\\&=i(\pi + 2k\pi)\mbox{ where }k\in\mathbb{Z}\\&=(2k+1)i\pi\end{align*}\]

There are infinitely many solutions for this equation!

The fact that there are infinitely many complex logarithms provides a motivation to define the principal complex logarithm:

\[\mbox{Log}_e z = \log_e|z| + i\mbox{Arg} z\]

Note the capital letters to mean the principal logarithm or the principal argument of the number \(z\).

Back to the Integral

With this context of the complex logarithm now, let us reconsider the integral of \(\frac{1}{x}\) and see what happens when we exclude the absolute value signs:

\[\begin{align*}\int \frac{1}{x}\, dx &= \log_e(x) + C\mbox{ (for a constant C)}\\&=\log_e|x| + i\arg x + C\end{align*}\]

Now \(i\arg x\) is a constant as well, which means this final line can be rewritten as:

\[\int \frac{1}{x}dx = \log_e|x| + K\mbox{ where }K=i\arg x+C\]

Hence, this shows that for the complex logarithm, the absolute value signs are actually not necessary because they are already implied from the way the complex logarithm works!

This may be a nice discovery, but should we now tell students that they don’t need to write the absolute value signs anymore? Absolutely not!

Even though the absolute values are not necessary over the domain and codomain of the complex numbers, the real valued logarithm is the assumed function that students in high school are expected to work with. Although I have gripes with the fact that we assume too much as discussed earlier, we must accept that the general notion of such functions at the high school level in differential and integral calculus is that they are real valued. This is mainly due to the fact that most theorems in high school have been proven true for real numbers, but may or may not fall apart for complex numbers.

Another Interesting Application

When solving \(x\in\mathbb{R}: \cos x = 2\), there is no real solution.

 

Now consider \(e^{ix}=\cos x + i\sin x\) and \(e^{-ix}=\cos x – i\sin x\). Adding them together we get:

\[\begin{align*}e^{ix}+e^{-ix}&=2\cos x\\\frac{e^{ix}+e^{-ix}}{2}&=\cos x\end{align*}\]

Now let’s solve \(x\in\mathbb{C}: \cos x = 2\).

\[\begin{align*}\frac{e^{ix}+e^{-ix}}{2}&=2\\e^{ix}+e^{-ix}&=4\\e^{2ix}+1&=4e^{ix}\\e^{2ix}-4e^{ix}+1&=0\\e^{ix} & = \frac{4\pm \sqrt{4^2-4(1)(1)}}{2}\\e^{ix} & = \frac{4\pm\sqrt{12}}{2}\\e^{ix} & = 2\pm \sqrt{3}\\ix & = \log_e(2\pm\sqrt{3})\\x & = \frac{1}{i}\log_e(2\pm\sqrt{3})\\x & = -i\log_e(2\pm\sqrt{3})\\x & = -i(\log_e|2\pm\sqrt{3}| + i2k\pi) \mbox{ where } k\in\mathbb{Z}\\x & = -i\log_e|2\pm\sqrt{3}| + 2k\pi\end{align*}\]

Add a Comment

Your email address will not be published. Required fields are marked *