Solved
Getting the wrong answer from an integral
- April 16, 2024
- 1 reply
- 1685 views
The C in your solution and the C in the highlighted solution are different constants of integration! The differ just by the sign, so this should not be any problem.
To be precise, the constant of integration stems from the first time you integrate the equation -> +C1 and C1 is any reals number.
When you now de-logarithmize it gets C=exp(C1) and now C only can be positive!!!
But because the integration of 1/x actually is ln (|x|) (note the absolute value), at the end C can be chosen any real number.
BTW, Prime can solve the simple ODE in one go:

The sign of the constant C does not matter. I could as well have substituted _z (thats the name of the variable generated by Prime originally) by -C to get the solution you highlighted.
BTW, even though it doesn't mean anything, the solution of Wolfram Alpha also uses the same sign convention

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.