<s>[INST] How do I solve differentil equation if the begining values are given? How do I solve differentil equation if the begining values are given?
$\frac{dx}{dt}=x^2+5x$ with x(0)=-3. I need to find x(t).
$\int \frac{dx}{x^2+5x}=\int dt$
So when I put it on Symbollab I get that left side is $-\frac{2}{5}arctanh(\frac{2}{5}(x+\frac{2}{5}))$, I already see that is going to be hard to extract x from here.
What have I done?
$\int \frac{dx}{x^2+5x}=\int \frac{dx}{x^2(1+\frac{x}{5})}$ than I use substitution that $1+\frac{x}{5}$ is u, than $-\frac{x^2}{5}du$.
Than I get $\frac{-1}{5}ln(1+\frac{x}{5})=t+C$.
$ln(1+\frac{x}{5})=-5t+C$
$1+\frac{x}{5}=e^{-5t}C$
$\frac{x}{5}=e^{-5t}C-1$
$x=\frac{5}{e^{-5t}C-1}$
$-3=\frac{5}{e^{0}C-1}$
$-3=\frac{5}{C-1}$
Than I calculate C. This all seems nice to me.
But when I put than integral in WolframAlpha I get that $\int \frac{dx}{x^2+5x}=\frac{1}{5}(log(x)-log(x+5))+constant$
Why I don't get when I integrate those results from WolframAlpha or Symbollab?
 [/INST] In your calculation the initial step
$$ 
\int \frac{dx}{x^2+5x}
\ne \int \frac{dx}{x^2(1+x/5)}
= \int \frac{dx}{x^2 + x^3/5}
$$
is wrong.
You can decompose the fraction using polynomial factorization and then look for a sum of the fractions with the factors as denominator
$$
\frac{1}{x^2+5x}
= \frac{1}{x(x+5)}
= \frac{A}{x} + \frac{B}{x+5} \iff \\
1 = A (x+5) + B x = (A+B)x + 5A
$$
Comparing the coefficients gives the equations
$$
A + B = 0 \\
5A = 1
$$
or $A = 1/5$, $B = -1/5$.
Thus
$$
\frac{1}{x^2+5x}
= \frac{1}{5} \left( \frac{1}{x}- \frac{1}{x+5} \right) \\
$$
This is called partial fraction decomposition.
So this leads to the WA solution.
</s>