Two different results of an integral

  • MHB
  • Thread starter Dustinsfl
  • Start date
  • Tags
    Integral
In summary, there was a conversation about the different results obtained from solving an integral for a solitary wave in the KdV equation. The professor's solution was found to be correct, while Wolfram's solution was incorrect. This was confirmed by differentiating both solutions and checking with Wolfram Alpha. The correct solution involves a natural logarithm and a trigonometric function.
  • #1
Dustinsfl
2,281
5
$\DeclareMathOperator{\sech}{sech}$

This integral arose when solving for a solitary wave in the KdV equation.

In class, the professor came up with:

\[
\int\frac{dx}{\sin(x)} = -\frac{1}{2}\ln\left[\frac{1 + \cos(x)}{1 - \cos(x)}\right]
\]
However, Wolfram obtains
\[
\int\frac{dx}{\sin(x)} = -\ln\left[\frac{1 + \cos(x)}{1 - \cos(x)}\right]
\]
but that changes our solitary waves solution from
\[
\sqrt{2\mu}e^{i\varepsilon^2\mu t}
\sech\left[\sqrt{\mu}(x - vt - x_0)\right]
\]
to
\[
\sqrt{2\mu}e^{i\varepsilon^2\mu t}
\sech\left[\frac{\sqrt{\mu}}{2}(x - vt - x_0)\right]
\]
For a solitary wave, the relation between the amplitude and the width has to at a certain portion. The professors solution for the solitary wave is correct but his integral doesn't workout compared to Wolframs.

Is there something I am missing?
 
Physics news on Phys.org
  • #2
Re: two different results of an integral

Check by differentiation:
\begin{align*}
\frac{d}{dx} \left[ -\frac{1}{2} \ln \left( \frac{1 + \cos(x)}{1 - \cos(x)} \right) \right]
&=- \frac{1}{2} \frac{1- \cos(x)}{1+ \cos(x)} \frac{(1- \cos(x))(- \sin(x))-(1+ \cos(x))( \sin(x))}{(1- \cos(x))^{2}} \\
&=- \frac12 \frac{- \sin(x)+ \sin(x) \cos(x)- \sin(x)- \sin(x) \cos(x)}{1- \cos^{2}(x)} \\
&= \frac{ \sin(x)}{ \sin^{2}(x)} \\
&= \frac{1}{ \sin(x)},
\end{align*}
as needed. So your professor's answer is definitely correct. Checking W/A's solution:
\begin{align*}
\frac{d}{dx} \left[- \ln \left( \frac{1 + \cos(x)}{1 - \cos(x)} \right) \right]
&= \frac{2}{ \sin(x)},
\end{align*}
which is definitely incorrect. That's odd that W/A would make a mistake like that. This does not strike me as a trivial mistake. When I plug this into W/A, it gives me
$$ \int \frac{dx}{ \sin(x)}= \ln \left( \sin \left( \frac{x}{2} \right) \right)-
\ln \left( \cos \left( \frac{x}{2} \right) \right)
=\ln \left( \tan \left( \frac{x}{2} \right) \right).$$
This answer is correct. What exactly are you typing into W/A?
 

FAQ: Two different results of an integral

What is an integral?

An integral is a mathematical concept that represents the area under a curve. It is used to find the total value of a function over a given interval.

What does it mean to have two different results from an integral?

If you get two different results from an integral, it means that there are two possible interpretations of the function or the interval being used. It could also indicate a mistake in the calculation.

Why might an integral have two different results?

An integral might have two different results due to the presence of a singularity or a break in the function. It could also be due to different methods of integration being used or a change in the limits of integration.

How can I determine which result is correct?

The best way to determine which result is correct is by checking your calculations and making sure all assumptions and conditions are met. You can also try using different methods of integration or breaking the integral into smaller parts to verify your answer.

Are two different results from an integral always incorrect?

No, two different results from an integral may not always be incorrect. It could be a sign of a complex function or a situation where multiple interpretations are possible. However, it is important to carefully check your calculations and assumptions to ensure accuracy.

Back
Top