Integration examples and using some simple coordinate transformations

ClearAll["Global`*"];

Integrate to find the blue area:

A1 = (∫_0^B)(∫_0^(m x))1\[DifferentialD]y\[DifferentialD]x

Note that typically, we don’t put the area in terms of the slope m. If we call the maximum height “H”, then using the equation of the diagonal line, we discover that ymax = H = m B. Then, solving for m, we get m = H / B. Finally, plugging this m back into the answer for area, we get the answer in its “expected” form:

m=(H/B);A1

Integrate to find the orange area:

A2 = (∫_0^(π/6))(∫_0^a)r\[DifferentialD]r\[DifferentialD]θ

We would expect that the area should be one third of a quarter circle, or one twelfth of a circle, so this seems right.

Integrate to locate the x-center of area (⛒) of the green shape:

By definition, the x-center of area is ((∫xdA)/(∫1dA)). However, because of the curves, this problem is clearly more suited to cylindrical coordinates, so we’d like to get rid of “x”. We’ll use x = r cos(θ). Also, since dA is r dr dθ, the result is:

xcm=(((∫_0^(π/2))(∫_a^b)r Cos[θ] r\[DifferentialD]r\[DifferentialD]θ)/((∫_0^(π/2))(∫_a^b)1r \[DifferentialD]r\[DifferentialD]θ))//Simplify

Since this looks pretty complicated, it’s hard to verify whether we think this is reasonable. But, for the picture as drawn, it looks like b is about 2a, and I would guess that the x center of area is near a. Let’s test it:

b=2 a;xcm//N

Integrate to determine the length of the red wire:

We clearly want s = ∫1ds. However, since ds = (Sqrt[(dx^2)+ (dy^2)]) , we have a decision to make: should we rewrite ds in terms of only dx, or in terms of only dy? I’ll choose dx, since the limit for that is what’s given. Therefore, 
ds = (Sqrt[(dx^2)(1+((((dy/dx)))^2))])=dx (Sqrt[1+((((dy/dx)))^2)]). We can easily take the needed derivative: dy/dx = 2 k x. So:

W=2; k = 0.45; (* these numbers match the picture pretty well... *)
L1=(∫_0^W)(Sqrt[1+(((2 k x))^2)])\[DifferentialD]x

Is this reasonable? For the numbers given, the upper limit of the wire is at (Subscript[y, max]) = k (W^2), or 1.8. The length of the straight diagonal line to this corner is easy to get from the Pythagorean Theorem, and is about 2.69. It makes sense that this curve would be a little longer than the straight line connecting the endpoints of the red line.

The green wire shown here makes one and a half loops around the origin, but gets bigger as it loops. 
The formula for the wire as plotted is θ = 3π(r-1), where the radius increases from r = 1.0 to r = 2.0.
Determine the length of the green wire. 
In this problem, ds = dr(Sqrt[1+(((r((dθ)/dr)))^2)]) . Clearly, since θ = 3π(r-1), then ((dθ)/dr) is just 3π for this problem. Therefore,
ds = dr(Sqrt[1+(((3π r))^2)]). Now we know enough to integrate:

L1=(∫_1.0^2.0)(Sqrt[1+(((3 π r))^2)])\[DifferentialD]r

Is this reasonable? The total length should be like one and half circles having some “average” radius of this plot. Since the plot ranges from 1.0 to 2.0, then we’d expect the length of the green line to be around (1.5) (2 π 1.5) = 14.14. So, I feel like this answer makes sense.