x=h - bok prostopadły do podstaw
a=x+4 - podstawa
b=x+2 - podstawa
P=\frac{a+b}{2}*h=\frac{x+4+x+2}{2}*x=\frac{(2x+6)*x}{2}=\frac{2x^2+6x}{2}=x^2+3x
40=x^2+3x
x^2+3x-40=0
\Delta=b^2-4ac=9+160=169
\sqrt(\Delta)=13
x_1=\frac{-b-\sqrt{\Delta}}{2a}=\frac{-3-13}{2}=\frac{-16}{2}<0 nie może3 być
x_2=\frac{-b+\sqrt{\Delta}}{2a}=\frac{-3+13}{2}=5
x=5
h=5
a=5+4=9
b=5+2=7
drugie ramię trapezu
c^2=h^2+(a-b)^2=5^2+(9-7)^2=25+4=29
c=\sqrt{29}
Ob=5+9+7+\sqrt{29}=21+\sqrt{29}