Home » Blog » Find functions f(x) continuous on the real line satisfying given conditions

Find functions f(x) continuous on the real line satisfying given conditions

Find functions f(x) continuous everywhere on \mathbb{R} such that

    \[ f'(x) + 2xe^{f(x)} = 0, \qquad f(0) = 0. \]


Let y = f(x) and we have a separable first order equation, so we compute,

    \begin{align*}  f'(x) + 2xe^{f(x)} = 0 && \implies && y' + 2xe^y &= 0 \\  && \implies && e^{-y} y' &= -2x \\  && \implies && \int e^{-y} \, dy &= -2 \int x \, dx \\  && \implies && -e^{-y} &= -x^2 + C \\  && \implies && -y &= \log (x^2 + C) \\  && \implies && f(x) &= -\log(x^2+C). \end{align*}

Then, from the condition f(0)= 0 we have

    \[ f(0) = -\log C = 0 \quad \implies \quad C = 1. \]

Therefore,

    \[ f(x) = -\log(x^2+1). \]

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):