A cylinder with different end diameters is a conical cylinder. This means you find the volume of the cylinder by subtracting the volume of a cone from the volume of a larger cone where the smaller cone forms the top section of the larger cone. If you know the two diameters, you can work out the height of the large cone by treating the cones like similar isosceles triangles. The large cone is the triangle ABC, with apex A, and the smaller cone is the similar triangle ADE, where D Is on AB and E on AC. The side DE is parallel to BC. If we call DE and BC the bases of the two triangles, then angles ADE, ABC, AED and ACB are all equal. Drop a perpendicular from A to BC. That's the height of the larger cone. The ratio of the bases is the same as the ratio of the heights, and the two bases represent the two diameters of the ends of the conical cylinder, represented by the trapezium DECB.
If h is the height of the conical cylinder, and the diameter of the small end is d1 and that of the bigger end is d2, it can be shown by similar figures that h1, the height of the smaller cone,=hd1/(d2-d1). The height of the larger cone is h1+h. The volume of the large cone is (pi)(d2/2)^2(h1+h)/3 and the volume of the smaller one is (pi)(d1/2)^2h1/3. The difference is the volume of the conical cylinder. I'll leave you to do the substitutions!