To cut a line in two so that the squares of ... (geometric construction) 
Cut a given straight line so that the sum of the square of one part and twice the square of the other part equals a given size.

Given a line of length $L$ which is cut in two pieces, lengths $x$ and $L-x$, I first thought of constructing the squares with sides $x$ and $\sqrt{2}(L-x)$ but I cannot relate the total area to a given length.
If $M$ is the given length the length to construct is
$$\frac{2L\pm\sqrt{3M-2L^2}}{3}$$
but I assume there is an easier way to solve this problem using only straight-edge and compass.
Any idea how to solve this problem? TIA.
 A: Let the segment lengths be $(x,L-x)$ for total length $L.$
Total area
$$ A=x^2+2(L-x)^2= 3x^2-4xL+2L^2 \tag 1 $$
should be a constant or minimum / maximum when segmented at some $x$.
Differentiating to find location of partition,
$$ 6x-4L=0, x=\dfrac{2L}{3} \to A_{min}= \dfrac{2L^2}{3};$$
which is a function of $L.$ It is easy to divide a line length  L =  OB into three equal parts. (A line drawn through any one end parallel lines from three equal segments as shown, take line trisected through D).

However in this problem the minimum is a priori specified to have  a given size =S, but not derivative driven $2 L^2/3$ minimum.  This is not possible without any modification of area expression in (1) accordingly, like in ..
$$  A=x^2+2(L-x)^2- \dfrac{2L^2}{3} +S  \tag2 $$
A numerical example for $ L=100, S=10000 $ gives desired area $=S$ at the calculated two thirds length.
Geometric construction for physical Area Check
Total area $ S= 10,000$ square units is fully accounted for as one square of $2L/3$ side and another five of $L/3$ side in rough sketch.


A: Given the square of one part plus twice the square of the other part equals the whole.
$$L=(x)^2+2(L-x)^2=2 L^2 - 4 L x + 3 x^2\\
\implies 3 x^2 - 4 L x + (2 L^2 - L) = 0$$
$$x=\frac{4L\pm\sqrt{16L^2-4(3)(2 L^2 - L)}}{2(3)}
=\frac{2L\pm \sqrt{L(3 - 2 L)}}{3}\quad x\in\mathbb{R}\iff 0\le  L\le \frac{3}{2}$$
Any value of $L$ in this range will work but the only (L,x) solutions that "contain" integers are
$$
(0,\space0)\qquad 
(1,\space1)\qquad (3/2,\space1)$$
So $$0^2+2(0-0)^2=0\qquad 
1^2+2(1-1)^2=1\qquad
 1^2+2(1.5-1)^2=1+2(.25)=1.5$$
Outside of this range, solutions are complex (containing imaginary parts),
i.e. $x\in\mathbb{C}$
$\textbf{Update}$ WolframAlpha shows the solution to be different from mine where I stayed in the limits.
$$(x)^2+2(L-x)^2-L=0,\quad L=414\\
\implies x = 276 + 5 i \sqrt{1518}\qquad L-x=138 + 5 i \sqrt{1518}$$
Multiplied back, it yields an enormous number for $L$, even with plus-minus the imaginary part here, and here.
