Results 1 to 4 of 4
Like Tree4Thanks
  • 2 Post By HallsofIvy
  • 1 Post By greg1313

Thread: how to avoid a negative logarithm?

  1. #1
    Member
    Joined
    May 2009
    Posts
    243
    Thanks
    3

    how to avoid a negative logarithm?

    Hi folks,

    I am trying to solve a simple separable first order differential equation, but the issue is really algebra.

    $\dfrac{dy}{dx} = \dfrac {y(x^2 + 1)}{(x^2 - 1)}$ with the boundary condition $y = 2$, when $x = 0$

    so

    $\int \dfrac{dy}{y} = \int \dfrac{x^2 + 1}{x^2 - 1} dx$

    $\int \dfrac{dy}{y} = \int \dfrac{(x^2 - 1) + 2}{x^2 - 1} dx$

    $\int \dfrac{dy}{y} = \int (1 + \dfrac{2}{x^2 - 1)} dx$

    $\ln y = x + \int \dfrac{2}{(x + 1)(x - 1)} dx $

    using partial fractions

    $\dfrac{2}{(x + 1)(x - 1)} = \dfrac{A}{(x + 1)} + \dfrac{B}{(x - 1)}$

    A = -1, B = 1

    so

    $\int \dfrac{2}{(x - 1)(x + 1)} dx = \int \dfrac{1}{(x - 1)} - \dfrac{1}{(x + 1)} dx$

    $\ln y = x + \ln (x - 1) - \ln (x + 1) + c $ where c is the constant of integration.

    $\ln y = x + \ln \dfrac{(x - 1)}{(x + 1)} + c $

    Now, this is the problem. If I put y = 2 and x = 0 to evaluate c, the log term is negative. I am sure there is a simple way of reorganising, but I just can't see it.

    Can anyone help?
    Last edited by s_ingram; May 14th 2018 at 12:46 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    19,798
    Thanks
    3035

    Re: how to avoid a negative logarithm?

    Your error is that $\displaystyle \int \frac{1}{x}dx$ is NOT "$\displaystyle ln(x)$", it is $\displaystyle ln(|x|)$.
    Thanks from s_ingram and topsquark
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Dec 2016
    From
    Earth
    Posts
    174
    Thanks
    74

    Re: how to avoid a negative logarithm?

    Quote Originally Posted by s_ingram View Post

    Can anyone help?
    Subject heading: "how to avoid a negative logarithm?"

    s_ingram, you are not talking about negative logarithms. You are talking about logarithms of negative numbers.


    Quote Originally Posted by HallsofIvy
    $\displaystyle \int \frac{1}{x}dx$ is NOT "$\displaystyle ln(x)$", it is $\displaystyle ln(|x|)$
    $\displaystyle \int \frac{1}{x}dx \ = \ ln|x| \ + \ C \ \ \ \ \ \ $ (where the absolute value bars are sufficient as grouping symbols).
    Last edited by greg1313; May 14th 2018 at 06:02 AM.
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Apr 2005
    Posts
    19,798
    Thanks
    3035

    Re: how to avoid a negative logarithm?

    Thanks for the correction.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. how to avoid negative logarithms
    Posted in the Algebra Forum
    Replies: 3
    Last Post: May 23rd 2017, 06:24 AM
  2. Replies: 6
    Last Post: Dec 28th 2012, 05:32 PM
  3. Logarithm equation cant have x be negative?
    Posted in the Algebra Forum
    Replies: 4
    Last Post: Jul 5th 2012, 02:31 AM
  4. avoid negative denominators
    Posted in the Algebra Forum
    Replies: 4
    Last Post: May 5th 2011, 05:18 AM
  5. Negative Base in a Logarithm
    Posted in the Algebra Forum
    Replies: 2
    Last Post: Nov 9th 2008, 10:50 PM

/mathhelpforum @mathhelpforum