Given $f,g:[1,+\infty)\to\mathbb{R}$ s.t $\lim _{x\to+\infty}\frac{f(x)}{g(x)}=L>0$. Prove $\int_1^{+\infty}f,\int_1^{+\infty}g$ converge/diverge Theorem: Given the continuous functions $ f,g : [ 1, +\infty ) \to \mathbb{R} $ that satisfy $\lim _{x \rightarrow+\infty} \frac{f(x)}{g(x)}=L>0$.  Prove the improper integrals $ \int_1^{+\infty} f(x)dx , \int_1^{+\infty} g(x)dx $ converge or diverge together.
Attempt:
Note we must have that
$ f>0 $ and $ g>0 $ from some place
or
$ f<0 $ and $ g<0 $ from some place
or
$ g ,f $ have the same sign in $ [ 1, +\infty) $.
Otherwise, we'd have that there are infinitely many $x's $ where $g,f $ differ and sign so we can chose a sequence $ 1<x_n \to \infty $  s.t. $ \lim _{n \rightarrow+\infty} \frac{f(x_n)} {g(x_n)}<0$ , a contradiction to the given $\lim _{x \rightarrow+\infty} \frac{f(x)}{g(x)}=L>0 $.
Suppose $ f>0 $ and $ g>0 $ from some place ( proof for $ f<0 $ and $ g < 0 $ from someplace or proof for the case where $ g,f $ have same sign in $ [1, +\infty ) $ are very similar
).
From the given  $ \lim _{x \rightarrow+\infty} \frac{f(x)}{g(x)}=L>0 $ we can say that $ \forall \epsilon>0 . \exists R>0 . \forall x>R . | \frac{f(x)}{g(x)} - L | < \epsilon $.
Note that $ -\epsilon < \frac{f(x)}{g(x)} - L < \epsilon  \longrightarrow 
 L - \epsilon < \frac{f(x)}{g(x)} < L + \epsilon \longrightarrow (L-\epsilon)g(x) < f(x) $.
Hence, for $ \epsilon = \frac{L}{2} $ there exists $ R>0 $ s.t. for all $ x>R $ we have that $ (L-\epsilon)g(x) =  \frac{L}{2} g(x) < f(x) $.
Suppose without loss of generality that $ R>1 $.
Suppose that $ \int_1^{+\infty} f(x)dx $ converges and we'll show that $ \int_1^{+\infty} g(x)dx $ converges ( proving that if  $\int_1^{+\infty} g(x)dx$ converges then $ \int_1^{+\infty} f(x)dx $ converges is similar if we look at $ f(x) < ( L + \epsilon) g(x) $ ) .
Under the new assumption, note that $ \int_R^{+\infty} f(x)dx > \frac{L}{2} \int_R^{+\infty} g(x) dx   $, hence from comparison test for integrals $ \int_R^{+\infty} g(x) dx $ exists.
Now, note that $ \int_1^{+\infty} g(x)dx = \int_1^{R} g(x)dx + \int_R^{+\infty} g(x)dx  $, Hence $ \int_R^{+\infty} g(x)dx = \int_1^{+\infty} g(x)dx -  \int_1^{R} g(x)dx  $ and since $ \int_R^{+\infty} g(x) dx $ exists then these two integrals also exist, hence $ \int_1^{+\infty} g(x)dx $ exists.
( After proving that  if  $\int_1^{+\infty} g(x)dx$ converges then $ \int_1^{+\infty} f(x)dx $ converges, we proved that $\int_1^{+\infty} g(x)dx ~ \text{ converges} \iff   \int_1^{+\infty} f(x)dx ~  \text{converges} $. Hence we also proved  $\int_1^{+\infty} g(x)dx ~\text{ diverges} \iff   \int_1^{+\infty} f(x)dx ~  \text{diverges} $ )
$ \square $
There are couple of things that I have questions about:

*

*Where have I used the fact that $f,g $ are continuous? It seems like I proved the theorem without using this given.
( I know if a function is continuous on a bounded interval the it is Riemann Integrable on that interval, but It seems to me that under the assumption that $ \int_1^{+\infty} f(x)dx $ converges, the assumption that $f,g $  are continuous is necessary in-order to say that $g $ is Riemann Integrable on $ [1,\infty) $ , hence I could perform the integrable $\int_1^{+\infty} g(x)dx $ in the inequality $ \int_R^{+\infty} f(x)dx > \frac{L}{2} \int_R^{+\infty} g(x) dx $ )

*Was I right that the cases " $ f,g> 0 $ from some place  or  $f,g< 0 $ from some place or $ g,f $ have the same sign in $ [1,+\infty) $ " are the all the possible cases?

*I think that the proofs for the other cases ( besides " $ f,g> 0 $ from some place  " ) are very similar for all the cases I have written, is that right?

*what do you think about the proof? Is it specious? if so, then why? if not, then what could be done better?

 A: Since we are able to talk about limit $L:=\lim_{x\rightarrow\infty}\frac{f(x)}{g(x)}$,
there exists $X_{1}>0$ such that $g(x)\neq0$ whenever $x\geq X_{1}$.
Note that $g$ is continuous, by Intermediate Value Theorem, we further
have $g(x)>0$ for all $x\geq X_{1}$ or $g(x)<0$ for all $x\geq X_{1}$.
Without loss of generality, we may assume that $g(x)>0$ for all $x\geq X_{1}$
(otherwise replace $f$ and $g$ by $-f$ and $-g$ respectively).
Since $0<\frac{L}{2}<\lim_{x\rightarrow\infty}\frac{f(x)}{g(x)}<2L$,
we can choose $X_{2}>0$ such that $\frac{L}{2}<\frac{f(x)}{g(x)}<2L$
whenever $x\geq X_{2}$. Take $X=\max(X_{1},X_{2})$. Note that $f(x)>0$
and $g(x)>0$ whenever $x\geq X$.
Define $F(x)=\int_{X}^{x}f(t)dt$ and $G(x)=\int_{X}^{x}g(t)dt$.
Note that $F$ and $G$ are monotonic increasing. Observe that $F(x)\leq2L\cdot G(x)$
and $G(x)\leq\frac{2}{L}F(x)$, so either $\lim_{x\rightarrow\infty}F(x)<\infty$
and $\lim_{x\rightarrow\infty}G(x)<\infty$ or $\lim_{x\rightarrow\infty}F(x)=\infty$
and $\lim_{x\rightarrow\infty}G(x)=\infty$. That is, either both
improper integrals converge or both improper integrals diverge.
