5

Question states: $$ y' + \frac{y}{x} = 6x+2$$ Obviously x cannot be zero. If we assume that $x$ is positive (i.e. $x>0$), we find the integrating factor as $$u(x)=e^{\int \frac{1}{x} dx}$$ which is equal to $x$. Then the solution is $$y(x)= \frac{1}{u(x)} \int (6x+2)(u(x)) dx = \frac {1}{x} \int 6x^2+2x \ dx = 2x^2+x+\frac{C}{x}.$$ Now, we assumed that $x$ is positive. But I couldn't get the same answer when I didn't make this assumption; that is, the integrating factor is $$u(x)=e^{\int \frac{1}{x} dx} = e^{ \ln \lvert x\rvert} = \lvert x\rvert.$$ Then this problem gets way more complicated, as the solution becomes $$y(x)= \frac{1}{u(x)} \int (6x+2)(u(x)) dx = \frac {1}{\lvert x\rvert} \int 6x \lvert x\rvert +2\lvert x\rvert \ dx.$$ My calculus textbook omitted the absolute value altogether; that is, the textbook indicated that the integrating factor was just $x$. Because the textbook is written by quite reputable and trustworthy authors (Ron Larson and Bruce Edwards), I was wondering (1) if treating the integrating factor as just $x$ is acceptable, and/or (2) How the solution is still correct if we must use the integrating factor as $\lvert x\rvert$. If we can omit the absolute value sometimes, how do we know when we can omit the absolute value sign and when we shouldn't? (As a side note, I fully understand why there's absolute value sign for the antidervative of $ \frac{1}{x} $).

GoodDeeds
  • 11,185
  • 3
  • 22
  • 42
  • Hint:$(\ln|x|)'=\frac{|x|'}{x}=\frac{\frac{|x|}{x}}{x}=\frac{1}{x}$ – Khosrotash Mar 13 '16 at 05:09
  • Khosrotash, thanks for the hint, but I still don't get it. Could you just fully explain? I already know that $ \int \frac {1}{x} dx = \ln \lvert x\rvert.$ –  Mar 13 '16 at 05:15
  • Oops, small mistake - $ \int \frac {1}{x} \ dx = \ln \lvert x\rvert + C. $ But you get the idea of what I'm saying. –  Mar 13 '16 at 06:25
  • Thank you Prof. Blatter. But the question didn't specify $x>0$ and thus we cannot make that assumption. –  Mar 13 '16 at 18:04
  • I don't know what an "integrating factor" is. At any rate: Divide your problem into two subproblems, one concerning the domain $x>0$ and the other concerning the domain $x<0$. When $x<0$ a primitive of ${1\over x}$ is $\log(-x)$. – Christian Blatter Mar 14 '16 at 09:57
  • $\displaystyle{\mathrm{d}\left\vert x\right\vert \over \mathrm{d}x} = \mathrm{sgn}\left(x\right)$. – Felix Marin Aug 29 '20 at 15:22

1 Answers1

2

You see that in your last equation attain the same result for $x>0$ and $x<0$. So absolute sign is omitted.

Davide Giraudo
  • 172,925
Daniel Li
  • 3,200
  • And this is true every single time since the integrating factor is multiplied by all the terms of the equation. So if you solve it once using $f(x)$ (first case) and once using $-f(x)$ (second case), where $|f(x)|$ is the integrating factor, the negative sign cancels out from the whole equation in the second case and you again end up with the same equation as the first case. – Shinsekai no Kami Aug 01 '22 at 10:55