Area of a semi circle on a rectangle First of all forgive my very poor and not to scale drawing. Also for the not so good looking maths formatting
Essentially I am looking for the area of the shaded part.
This is what I've gotten so far
Area of larger circle with radius being $20+w$ minus area of inner circle radius of $20$. Add the area of the rectangle which has a length of $40+2w$ and a length of $w$.
so the final equation is
$$
A = \frac{\pi}{2} ( w^2 + 40w ) + 2w^2 + 40w
$$
it asks to find $w$ when the area is given (i.e. $A = 200$). I haven't been able to solve it without having to go through a long messy quadratic equation, or is there a more straightforward way and I went wrong somewhere?
Thanks!
 A: It is easier to take the mean radius $R_m$ of shaded circle:
$R_m=\frac {20+20+w}2=20+\frac w 2$
Then the area is:
$$A =w\cdot R_m\cdot \pi+20 w=w(20+\frac w 2)\pi+20w=\frac{\pi}2 w^2+20(\pi+1)w$$
This is a  function of degree two that can be easily plotted. For $A=200$ you can find w:
$$A\approx\frac{\pi}2 w^2+20(\pi+1)w\approx 1.57 w^2+82.8 w=200$$
which gives $w\approx 2.3$
A: This formula for the area is correct:

$$
A = \frac{\pi}{2} ( w^2 + 40w ) + 2w^2 + 40w
$$


I haven't been able to solve it without having to go through a long messy quadratic equation, or is there a more straightforward way and I went wrong somewhere?

There is no more straightforward way.
Let $P=\pi/2+2$, $Q=40(\pi/2+1)$ then if $A=Pw^2+Qw$ solutions for $w$ are
$$
-Q\pm\sqrt{Q^2+4\times A\times P}\over2P
$$
Let $A=200$ and I used a computer to do the calculation.
package main

import (
    "fmt"
    "math"
)

var Q = 40 * (math.Pi/2 + 1)
var P = math.Pi/2 + 2

func area(w float64) float64 {
    return P*w*w + Q*w
}
func main() {
    A := 200.0
    sqrt := math.Sqrt(Q*Q + 4*A*P)
    rpos := (-Q + sqrt) / (2 * P)
    rneg := (-Q - sqrt) / (2 * P)
    fmt.Printf("%g %g %g %g\n", rpos, area(rpos), rneg, area(rneg))
}

Run it online here: https://go.dev/play/p/sfZcbmdNJjh
1.8287874459276476 199.9999999999999 -30.6268043756965 200

Since the length of the shaded part is about $L\approx 20+20+65$ and the area is $\approx L\times w$ we would expect a $w$ value just under 2, so this answer makes sense.
Obviously the negative value seems to be physically meaningless, since the initial radius is 20.
