If I have the differential equation
$\frac{d^2 y}{dx^2} = f(x)$
and integrate once using indefinite integrals
$\frac{d y}{dx} = c_1 + \int f(x) dx $
then apply the boundary condition $\frac{d y}{dx}\big|_{x=0} = 0$
$0 = c_1 + [\int f(x) dx]_{x=0} $
$ c_1 = - \big[\int f(x) dx\big]_{x=0} $
Substitute $c_1$ back into the differential equation
$\frac{d y}{dx} = \int f(x) dx - \big[\int f(x) dx\big]_{x=0} $
Is the above equation equal to the following?
$\frac{d y}{dx} = \int_0^x f(x) dx$
It looks like the fundamental theorem of calculus $F(b)-F(a) = \int_a^b f(x)dx$ where $a=0$ and $b=x$ and $\int f(x) dx$ is essentially equal to $ \big[\int f(x) dx\big]_{x=x}$.
However, if we integrate again
$y(x) = c_2 + \int\int_0^x f(x) dx dx$
we are now mixing definite and indefinite integrals which I have been told is bad. Is my thinking here correct and is mixing definite and indefinite integrals really that bad?
Thanks
Using an integration variable (the $x$ in $\int dx$) that matches one of the limits of integration runs counter to the conventions normally used. It is "bad" in the sense that you may know what you mean by it, but that meaning can get very ambiguous for all but the simplest of expressions. That is why for serious work, one uses a distinct symbol for each "dummy" integration variable.
With that in mind, let's discuss your first line: $$ \frac{dy}{dx} = c_1 + \int f(x)dx $$ What is really happening is $$ \frac{dy}{dx} = \int_{u=a_1}^x f(u)du $$ with arbitrary $a_1$; of course, since by sliding $a_1$ I can slide the value of that integral by any constant, the mnemonic form of $c_1 + \int f\, dx$ is clear enough.
If we now incorporate our boundary condition that $\frac{dy}{dy} = 0$ when $x=0$ that says $$ 0 = \int_{u=a_1}^0 f(u)du $$ which for a generic function $f$ is satisfied by $a_1 = 0$. Thus $$ \frac{dy}{dx} = \int_{u=0}^x f(u)du $$ Notice how one avoids confusing integration limits with integration variables, and avoids ever using an integral with just one limit -- although in this case, since the lower limit happens to be zero, one could see what you mean when you leave it out, that path leads to ambiguities for less simple cases.
Now we integrate again, and just as before, the "$x$" in the expression becomes a dummy variable in the integral, and $x$ becomes an upper limit of integration: $$ y(x) = \int_{v=a_2}^x \int_{u=0}^v f(u)du \, dv $$ which we could certainly write in shorthand as $$ y = c_2 + \int\int f$$ but that really is more fuzzy. When you have a double integral like this, where one integration variable is used as a limit in the other integral, that is for example different than a double integral representing an integral over some rectangle in an $xy$ plane.
So my advice is to know that you could get away with playing fast and loose with the integral notation, but to play it safe and careful by writing it out the way that math notation has developed over the years. Because the object here is to know for sure that you get things right.