How can I calculate the force that is applied on a tube by another tube? Let's say there is two tubes(cylinders with no tops or bottoms) with charges $q_1$ and $q_2$, radii $b_1$ and $b_2$, lengths $l_1$ and $l_2$. These tubes are located along the axis of each other's surfaces like in this figure:

If the electric field that the first tube creates on a point is;
$$
E = \frac{q}{4\pi\varepsilon_0}\left(\frac{1}{\sqrt{b^2 + (c-a)^2}} - \frac{1}{\sqrt{b^2 + (c+a)^2}}\right)
$$
where $b$ is the radius of the tube, $c-a$ is the distance between the centre of the furthest part of the tube and the point, $c+a$ is the distance between the centre of the closest part of the tube and the point, $q$ is the total cahrge on the tube and 
$\epsilon_0$ is the electric constant. Here is the figure of the tube and the point for those who didn't understand from my description:

The question is how can I calculate the force between these two tubes?
Update:The electric field formula I found is not true since it is valid for a point on axis of the cylinder. Thus I would be pleased if you could show me how to solve the problem from the beginning.
 A: This can be done in five steps (four integrals).


*

*Start with the force of two point charges: you know this equation 
$$F=\frac{Q_1Q_2}{4\pi\epsilon_0 r^2}$$

*Integrate this force over an infinitesimally thin ring of charge: now you have the force of a ring on an off-axis point (hint: you only need the axial component - the radial components will cancel due to symmetry in the next step). The distance $R$ will be a function of position along the ring (since the point charge is off-axis)

*Integrate over all possible points that constitute a second ring: now you have the force of one ring on another; with the two rings on the same axis, the force will be along that axis. This is easy since the axial force is the same everywhere (so no difficult integration needed - just multiply by $2\pi$ and take account of the "charge per unit length").

*Integrate over the length of the first cylinder: now you have the force of a cylinder on a ring. This is a bit harder - you are in essence integrating the force over a series of rings of variable (axial) distance

*Integrate over the second cylinder: this is the sum of the force between a cylinder and a series of rings of different distance to the cylinder.


Note that your expression for the on-axis force of the cylinder is not terribly helpful since the charges of the second cylinder are off-axis.
A: The answers already in here are good; unfortunately the integrals that arise are quite nasty, and don't have solutions in terms of elementary functions. Here is some more detail, in the special case when the tubes have zero length (so they are just charged circular loops), and further they have the same radius $b$, with separation $d$. You'll see that this is plenty nasty already!
By general considerations (dimensional analysis in particular), the force will be directed along the common axis and will take the form
$$
F=\frac{q_1q_2}{4\pi\epsilon_0 d^2}f\left(\frac{b}{d}\right)
$$
for some function $f$. All the nontrivial information in the problem is encoded in the function $f$, which tells us how the force depends on the geometry of the setup. It remains to work out what this function looks like. We can get a long way with some physical intuition and limiting cases.
Firstly, the limiting case when the ratio $x=\frac{b}{d}$ of radius to separation is very small. Now the rings essentially become point particles, so we should reduce to Coulomb's law: $f(x) \sim 1$ as $x\to0$.
Now, what happens if we increase the radius while keeping separation fixed? The charge is tending to get more separated, so the forces should be decreasing: we should find that $f(x)$ decreases as $x$ increases.
Finally, the limiting case when $x$ is very large: now, the rings have such a wide radius that locally the problem looks like the force between parallel charged wires, which is $\frac{\lambda_1\lambda_2}{2\pi\epsilon_0 d}$ per unit length, where the $\lambda$s denote charges per unit length. From this, you can work out that $F\sim \frac{1}{2\pi b}\frac{q_1q_2}{2\pi\epsilon_0 d}$,and $f(x)\sim\frac{1}{\pi x}$ as $x\to\infty$.
Now the main physics lesson to draw is that you've now learnt pretty much everything qualitative about the force from these simple considerations without a calculation! Unless you really need to, you can stop here...
But I suppose I'll carry on a little further.
Consider two small elements of the circular wires. We can put them at positions $(b\cos\theta_1,b\sin\theta_1,0)$ and $(b\cos\theta_2,b\sin\theta_2,d)$, with ends separated by small angles $\delta \theta_1,\delta \theta_2$. The $\theta$s denote cylindrical polar angles of the positions of the charge elements in question. They carry charges $\frac{\delta \theta_1}{2\pi}q_1,\frac{\delta \theta_2}{2\pi}q_2$. They are separated by distance $r=\sqrt{(b\cos\theta_1-b\cos\theta_2)^2+(b\sin\theta_1-b\sin\theta_2)^2+d^2}=\sqrt{d^2+2b^2(1-\cos(\theta_1-\theta_2))}$. The force between them in the $z$-direction (other directions give 0 in the end by symmetry) is hence
$$
\frac{q_1q_2\delta\theta_1\delta\theta_2 d}{(2\pi)^24\pi\epsilon_0 r^3}
$$
from Coulomb's law. The total force is then given by summing over all such elements, which in the limit as they become very small is the integral:
$$
F =\int_{-\pi}^\pi\int_{-\pi}^\pi\frac{q_1q_2d}{(2\pi)^24\pi\epsilon_0 r^3}d\theta_1d\theta_2 \\
=\frac{q_1q_2}{4\pi\epsilon_0 d^2} \frac{1}{4\pi^2}\int_{-\pi}^\pi\int_{-\pi}^\pi \left[1+2\frac{b^2}{d^2}(1-\cos(\theta_1-\theta_2))\right]^{-3/2}d\theta_1d\theta_2.
$$
Here one of the integrals can be shifted by periodicity to be over $\phi=\theta_1-\theta_2$, and the second will then give simply $2\pi$. The remaining integral is what gives us $f$, which can be simplified to
$$
f(x)=\frac{1}{2\pi}\int_{-\pi}^\pi \left[1+4x^2 \sin^2\left(\frac\phi2\right)\right]^{-3/2}d\phi,
$$
which finally can be evaluated, but only in terms of the Jacobi elliptic integral:
$$
f(x)=\frac{2 E\left(\frac{1}{1+\frac{1}{4 x^2}}\right)}{\pi  \sqrt{4 x^2+1}}
$$
where $E$ is the special function, the Complete Elliptic Integral of the second kind.
Here's a graph of $f$. It has all the properties that we worked out without the messy computation.

A: Without actually providing the mathematical details (which is left for the reader) the basic outline is this:
1.Select a differential segment (a segment of infinitesimal lateral dimensions) on the second cylinder.
2.Write the electric field expression for an infinitesimal charge on the segment.
3.Write the force equation and integrate over the entire surface.
A: Are you talking about the forces two parallel current-carrying wires exert on one another? 
Given two current-carrying wires, $a$, and $b$, we can determine the force exerted on wire $b$ by wire $a$ with $$F=(µ_oI_a/2πr) I_bL$$
Where F is the force exerted, $µ_o$ is the magnetic permeability of a vacuum, $I_a$ is the current flowing through wire $a$, $I_b$ is the current flowing through wire $b$, and $l$ is the length of the section of wire $b$ in the the magnetic field of wire $a$, and $r$ is the distance between the wires.
So, let's work through an example problem.
What is the force wire $a$ exerts on wire $b$ if both wires carry a current of 3 Amps, are 0.25m apart, and if wire $b$ has 1m of wire in the magnetic field of wire $a$.
$$F=(µ_oI_a/2πr)I_bL$$
$$F=(µ_o(3)/2π(0.25))(3)(1)$$
$$F=3(µ_o⋅3/1.57079)$$
$$F=3(µ_o⋅1.9098)$$
$$F=3((4π×10^{−7})⋅1.9098)$$
$$F=3(2.4⋅10^{-6})$$
$$F=7.2⋅10^{-6}\text{ Newtons}$$
I would like to apologize in advance in the case that I misunderstood the question.
I hope I was able to help. I'm going to add this to my favorites list to see what happens. That is, if I didn't answer your question.
