Does the cosmological constant solve the flatness of the Universe with 2 independent methods? First. The universe is flat and not negativity curved because whatever dark energy is made from represented by the cosmological constant adds to the side of the density in the first Friedman equation:
$$\left(\frac{\dot{a}}{a}\right)^2 - \frac{8πGρ}{3} -\frac{Λc{^2}}{3} = -\frac{kc{^2}}{a^2}$$
So that the curvature $k$ is zero.
Second. The universe is not flat. It just looks flat because inflation, caused by the cosmological constant, blew up small flat patches of space.
These two explanations of why the universe is flat, have the same root (cosmological constant) but to me at least seem to contradict with each other. If they are indeed the same explanation done differently please explain.
 A: If I understand your argument correctly you're saying that:


*

*right now dark energy makes the universe flat by contributing to the overall density and making $\Omega = 1$

*during inflation the inflaton field made the universe flat by stretching it out and smoothing all the curvature away
and you are asking if these are two different mechanisms.
Assuming I've understood you correctly, the answer is that they are both the same mechanism. Inflation smoothed out the curvature because it made the density parameter $\Omega$ unity just as dark energy does today.
The density parameter $\Omega$ is given by:
$$ \Omega = \frac{\rho}{\rho_c}$$
where $\rho_c$ is the critical density given by:
$$ \rho_c = \frac{3}{8\pi G}\left(\frac{\dot{a}}{a}\right)^2 $$
During inflation the universe behaved like a universe with a large positive cosmological constant, and one of the unintuitive things about a universe like this is that the density of the inflaton field doesn't change as the universe expands. The density has the constant value:
$$ \rho_\Lambda = \frac{c^2\Lambda}{8\pi G} $$
and it's constant because $\Lambda$ is constant. This means that $\Omega$ is inversely proportional to the expansion rate:
$$ \Omega \propto \frac{1}{{}^{\dot{a}}/{}_{a}} $$
Note this point, because what we will find is that during inflation if $k\gt 0$, i.e. $\Omega \gt 1$, the expansion rate increases and therefore $\Omega$ decreases towards unity. Conversely if $k \lt 0$, i.e. $\Omega \lt 1$, the expansion rate decreases and therefore $\Omega$ increases towards unity. Either way inflation pushed $\Omega$ towards unity and that's why it smoothed away the curvature.
To show this we take your equation (i.e. the first Friedman equation) and because the dynamics are dominated by the huge cosmological constant we ignore any matter present. Your equation then simplifies to:
$$ \left(\frac{\dot{a}}{a}\right)^2 = \frac{\Lambda c{^2}}{3} - \frac{kc{^2}}{a^2} \tag{1} $$
And the second Friedman equation, again ignoring the matter, becomes:
$$ \frac{\ddot{a}}{a} = \frac{\Lambda c{^2}}{3} \tag{2} $$
Now we want to find out how the expansion rate $\dot{a}/{a}$ changes with time so we can find out how $\Omega$ changes with time. To do this we use the rule for differentiating a fraction:
$$ \frac{d}{dt} \left(\frac{u}{v}\right) = \frac{v\dot{u} - u\dot{v}}{v^2} $$
So we get:
$$ \frac{d}{dt} \left(\frac{\dot{a}}{a}\right) = \frac{a\ddot{a} - \dot{a}\dot{a}}{a^2} = \frac{\ddot{a}}{a} - \left(\frac{\dot{a}}{a}\right)^2 \tag{3} $$
Now we can use equations (1) and (2) to substitute for $\ddot{a}/a$ and $\dot{a}/a$ in equation (3), and we end up with:
$$ \frac{d}{dt}\left(\frac{\dot{a}}{a}\right) = \frac{\Lambda c{^2}}{3} - \frac{\Lambda c{^2}}{3} + \frac{kc{^2}}{a^2} $$
or:
$$ \frac{d}{dt}\left(\frac{\dot{a}}{a}\right) = \frac{kc{^2}}{a^2} \tag{4} $$
And this is our key result. Suppose we start with a positive curved $k \gt 0$ overdense $\Omega \gt 1$ bit of the universe. Equation (4) tells us that in this case the expansion rate $\dot{a}/a$ increases with time. But since the density parameter in inversely proportional to the expansion rate that means $\Omega$ decreases with time. So this means:

If $\Omega$ starts out greater than one then inflation makes it decrease

And I won't go through the workings, but in the same way we find:

If $\Omega$ starts out less than one then inflation makes it increase

And the conclusion is that inflation drives the value of $\Omega$ towards unity.
So right now dark energy makes $\Omega$ unity and during inflation the inflaton made $\Omega$ unity. There is no difference between the two cases.
