Trapezoid

Author

Eric W. Weisstein
November 7, 2016

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneGeometry/Trapezoid.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Trapezoid.html.

©2016 Wolfram Research, Inc. except for portions noted otherwise

Definitions

ineq=With[{p=Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]},y≥0&&p x+b^2 y+(a^2-c^2+d^2) y≤b (p+2 a y)&&p+2 a y≥2 b y&&p x+2 a b y≥(a^2+b^2+c^2-d^2) y];

implreg=ImplicitRegion[ineq,{x,y}];

reg=Polygon[With[{p=Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]},{{0,0},{b,0},{a+((a-b)^2+c^2-d^2)/(2 (-a+b)),p},{((a-b)^2+c^2-d^2)/(2 (-a+b)),p}}]]

assum=0<a<b&&c>0&&d>0;

Plots

Diagram

LaminaData["FilledTrapezoid","Diagram"]

DiscretizeRegion

Block[{a=1,b=1.5,c=.6,d=.7},DiscretizeRegion[reg]]

Schematic polygon

trap=Line[v={
{0,0},
{b,0},
{a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))},{(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))},
{0,0}
}];

Block[{a=1,b=1.5,c=.8,d=.9},
h=((Sqrt[(-a+b+c+d)(a-b+c+d)×(a-b+c-d)(a-b-c+d)])/(2 (b-a)));
Graphics[{
trap,
{Dashing[{.03,.015}],Line[m=Mean/@{v[[{4,1}]],v[[{2,3}]]}]},
EqualSideTicksAboutMidpoint[Line[v[[{1,4}]]],1,.04,0],
EqualSideTicksAboutMidpoint[Line[v[[{2,3}]]],2,.04,.04],
Text[Style["b",Italic],{b/2,-.1}],
Text[Style["a",Italic],{0,.1}+Mean[v[[{3,4}]]]],
Text[Style["c",Italic],m[[1]]-{.08,0}],
Text[Style["d",Italic],m[[2]]+{.1,0}],
Text[Style["m",Italic],Mean[m]+{0,.1}],
Arrowheads[{-.04,.04}],Arrow[{{-.2,0},{-.2,h}}],
Line[{{-.23,0},{-.03,0}}],
Line[{{-.23,h},{.05,h}}],
Text[Style["h",Italic],{-.2,h/2},Background->White]
}]]

Diagonals and Height

d2[x_,y_]:=(x-y).(x-y)

Clear[c,d,b,a,p,q]

Factor//@(FullSimplify[Solve[{d2[{0,0},{x1,h}]==c^2,d2[{x1,h},{b,0}]==p^2,x2-x1==a,d2[{x2,h},{b,0}]==d^2,d2[{0,0},{x2,h}]==q^2},{h,p,q,x1,x2}],a<b&&0<d≤c&&p>0&&q>0]//Simplify)

Last[%]

Limit[((Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])/(2(b-a)))/.{d->c},b->a]

Simplify[((Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])/(2(b-a)))/.d->c,a<b]

FullSimplify[(Sqrt[(c^2)-((b-a)/2)^2])]

((1/2)(Sqrt[Factor[4(c^2)-(b-a)^2]]))

Horizontal Offsets and angles

Assuming[a<b&&0<d≤c,Factor//@FullSimplify[Solve[
{
SquaredEuclideanDistance[{0,0},{x1,h}]==c^2,
SquaredEuclideanDistance[{x1,h},{b,0}]==p^2,
x2-x1==a,
SquaredEuclideanDistance[{x2,h},{b,0}]==d^2,
SquaredEuclideanDistance[{0,0},{x2,h}]==q^2
},
{x1,x2},
{p,q,h}
]]//Simplify]

Angles

trap={
{0,0},
{b,0},
{a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))},
{(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))}
};

Block[{a=1,b=1.5,c=.6,d=.7},Graphics[Polygon[trap]]]

FullSimplify[Simplify[Normalize/@Subtract@@@Partition[trap,2,1,1],a>0&&b>0]/.Abs[x_]^2:>x^2,d>0&&c>0]

sidevecs={{-1,0},{-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b) d)),((Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])/(2 (a-b)d))},{1,0},{-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b) c)),-((Sqrt[-(a-b+c-d) (-a+b+c-d) (a-b+c+d) (-a+b+c+d)])/(2 (a-b)c))}};

vertexvecs=Partition[sidevecs,2,1,1]

ArcCos/@(Dot@@@vertexvecs)

Block[{a=1,b=1.5,c=.6,d=.7},{ArcCos[(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b) d))],ArcCos[-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b) d))],ArcCos[-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b) c))],ArcCos[(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b) c))]}]

By hand:

Factor[(1/d)FullSimplify[b-(((a^2)-(b^2)-(c^2)+(d^2))/(2 a-2 b))]]

Block[{a=1,b=1.5,c=.6,d=.7},{ArcCos[(((((b-a))^2)+(c^2)-(d^2))/(2(b-a)c))],ArcCos[(((((b-a))^2)-(c^2)+(d^2))/(2 (b-a) d))],π-ArcCos[(((((b-a))^2)-(c^2)+(d^2))/(2(b-a) d))],π-ArcCos[(((((b-a))^2)+(c^2)-(d^2))/(2(b-a)c))]}]

Block[{a=1,b=1.5,c=.6,d=.7},{ArcCos[(((((b-a))^2)+(c^2)-(d^2))/(2(b-a)c))],ArcCos[(((((b-a))^2)-(c^2)+(d^2))/(2 (b-a) d))],ArcCos[(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b) d))],ArcCos[(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b) c))]}]

Intersection of diagonals

i=FullSimplify[With[{x1=-(((a^2)-2 a b+(b^2)+(c^2)-(d^2))/(2 (a-b))),x2=(((a^2)-(b^2)-(c^2)+(d^2))/(2 (a-b))),h=-((Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])/(2 (a-b)))},
Intersections[Line[{{0,0},{x2,h}}],Line[{{b,0},{x1,h}}]]
]]

With[{a=1,b=1.5,c=.6,d=.7},
With[{x1=-(((a^2)-2 a b+(b^2)+(c^2)-(d^2))/(2 (a-b))),x2=(((a^2)-(b^2)-(c^2)+(d^2))/(2 (a-b))),h=-((Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])/(2 (a-b)))},Show[Graphics[{
ClosedLine[{{0,0},{b,0},{x2,h},{x1,h}}],
Line[{{0,0},{x2,h}}],
Line[{{b,0},{x1,h}}],
PointSize[.03],Point[{((b ((a^2)-(b^2)-(c^2)+(d^2)))/(2 ((a^2)-(b^2)))),((b (Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)]))/(2 (-(a^2)+(b^2))))}]
}],AspectRatio->Automatic]
]
]

Diagonal-produced triangles

p={((b ((a^2)-(b^2)-(c^2)+(d^2)))/(2 ((a^2)-(b^2)))),((b (Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)]))/(2 (-(a^2)+(b^2))))};
x1=-(((a^2)-2 a b+(b^2)+(c^2)-(d^2))/(2 (a-b)));
x2=(((a^2)-(b^2)-(c^2)+(d^2))/(2 (a-b)));
h=-((Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])/(2 (a-b)));

deltaa=Simplify[Simplify[Area[Triangle[{{x1,h},p,{x2,h}}]],0<a<b&&c>0&&d>0]/.(Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])->-2(a-b)hh,hh>0&&0<a<b]

deltaa=Simplify[Area[Triangle[{{x1,h},p,{x2,h}}]]/.(Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])->-2(a-b)hh,hh>0&&0<a<b]

deltab=Simplify[Area[Triangle[{{0,0},p,{b,0}}]]/. Abs[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]->-2(a-b)hh,hh>0&&0<a<b]

deltab=Simplify[(((b^2) (Sqrt[Abs[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]]))/(4 (-(a^2)+(b^2))))/.(Sqrt[Abs[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]])->-2(a-b)hh]

deltac=Simplify[Area[Triangle[{{0,0},p,{x1,h}}]]/.(Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])->-2(a-b)hh,hh>0&&0<a<b]

deltad=Simplify[Area[Triangle[{{b,0},p,{x2,h}}]]/.(Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])->-2(a-b)hh,hh>0&&0<a<b]

{deltaa deltab,deltac deltad}

Inequality

d2[x_,y_]:=(x-y).(x-y)

Assume b is the bottom base, a is the top base, and b > a

FullSimplify[Solve[{d2[{0,0},{x,y}]==c^2,d2[{x+a,y},{b,0}]==d^2},{x,y}],a>0&&b>0&&c>0&&d>0&&0<a<b]

poly=Polygon[{
{0,0},
{b,0},
{a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))},{(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))}
}];

Graphics[Block[{a=1,b=1.5,c=.6,d=.7},poly],Axes->True]

Graphics[Block[{a=1,b=1.5,c=.8,d=.8},poly],Axes->True]

Graphics[Block[{a=1,b=1.5,c=.625,d=.8},poly],Axes->True]

Inequality

FullSimplify[Inequalities[poly,{x,y}],a>0&&b>0&&c>0&&d>0&&0<a<b]

FullSimplify[%/.{Sign[(a-b+c-d) (a-b-c+d) (a-b+c+d)]->1}]

ineq[x_,y_]:=y≥0&&(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) x+(b^2) y+((a^2)-(c^2)+(d^2)) y≤b ((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])+2 a y)&&(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])+2 a y≥2 b y&&(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) x+2 a b y≥((a^2)+(b^2)+(c^2)-(d^2)) y

Block[{a=1,b=1.5,c=.6,d=.7},RegionPlot[ineq[x,y],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))},AspectRatio->Automatic,Frame->False,Axes->True]]

Block[{a=1,b=1.5,c=.7,d=.6},RegionPlot[ineq[x,y],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))},AspectRatio->Automatic,Frame->False,Axes->True]]

Area

By end triangles plus rectangle

1/2x1 h+(x2-x1)h+1/2(b-x2)h/.x2->x1+a//Simplify

NIntegrate

Block[{a=1,b=1.5,c=.6,d=.7},NIntegrate[Boole[ineq[x,y]],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2 (b-a)))}]]

Block[{a=1,b=1.5,c=.6,d=.7},(1/4)((b+a)/(b-a))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])]

y≥0&&(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) x+(b^2) y+((a^2)-(c^2)+(d^2)) y≤b ((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])+2 a y)&&(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])+2 a y≥2 b y&&(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) x+2 a b y≥((a^2)+(b^2)+(c^2)-(d^2)) y/.(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])->p

Integrate[Boole[y≥0&&p x+(b^2) y+((a^2)-(c^2)+(d^2)) y≤b (p+2 a y)&&p+2 a y≥2 b y&&p x+2 a b y≥((a^2)+(b^2)+(c^2)-(d^2)) y],{x,-∞,∞},{y,-∞,∞},Assumptions->0<a<b&&c>0&&d>0&&p>0]

PiecewiseToList[p_Piecewise]:=First[List@@p]

PiecewiseSimplify[p_Piecewise,assum_]:=Module[{expr={Assuming[#[[2]]&&assum,Refine[FullSimplify[#[[1]]]]],Assuming[assum,FullSimplify[#[[2]]]]}&/@PiecewiseToList[p]},
Select[expr,FreeQ[#,Equal]&]
]

PiecewiseSimplify[expr,0<a<b&&c>0&&d>0&&p>0]

Geometry

Simplify[
With[{x1=-(((a^2)-2 a b+(b^2)+(c^2)-(d^2))/(2 (a-b))),x2=(((a^2)-(b^2)-(c^2)+(d^2))/(2 (a-b))),h=-((Sqrt[-(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)])/(2 (a-b)))},
Area[Polygon[{{0,0},{b,0},{x2,h},{x1,h}}]]]
]

(1/2)h(x1+x2)+a h/.{x1->-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2->-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))}//Simplify

By Integration

Block[{a=.7,b=1.5,c=.6,d=.7},Block[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},RegionPlot[y<(h/x1)x&&0<x<x1&&0<y<h,{x,0,x1},{y,0,h},AspectRatio->Automatic]]]

Block[{a=.7,b=1.5,c=.6,d=.7},Block[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},RegionPlot[y<(h/(x1+a-b))(x-b)&&a+x1<x<b&&0<y<h,{x,0,b},{y,0,h},AspectRatio->Automatic]]]

Finite Boole

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b)))},Integrate[Boole[y<(h/(x1+a-b))(x-b)],{x,0,x1},{y,0,h},Assumptions->0<a<b&&c>0&&d>0]
]//Timing

With[{x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b)))},Integrate[Boole[y<(h/(x1+a-b))(x-b)],{x,0,x1},{y,0,h},Assumptions->0<a<b&&c>0&&d>0]]//Timing

With[{x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b)))},Integrate[Boole[y<(h/(x1+a-b))(x-b)],{x,0,x1},{y,0,h}]]//Timing

With[{x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b)))},Integrate[Boole[y<(h/(x1+a-b))(x-b)],{x,0,x1}]]//Timing

With[{x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b)))},Integrate[Boole[y<(h/(x1+a-b))(x-b)],{y,0,h}]]//Timing

Infinite Boole

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[Boole[y<(h/x1)x&&0≤x<x1&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[Boole[x1≤x<a+x1&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[Boole[y<(h/(x1+a-b))(x-b)&&a+x1≤x<b&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

(((Sqrt[(-a+b+c-d) (-a+b-c+d) (a-b+c+d) (-a+b+c+d)]) ((((a-b))^2)+(c-d) (c+d)))/(8 (((a-b))^2)))+-((a (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]))/(2 (a-b)))+(((Sqrt[(-a+b+c-d) (-a+b-c+d) (a-b+c+d) (-a+b+c+d)]) ((((a-b))^2)-(c^2)+(d^2)))/(8 (((a-b))^2)))//FullSimplify

-((a (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]))/(2 (a-b)))

Triangular Region

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[1,{x,0,x1},{y,0,(h/x1)x}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[1,{x,x1,x1+a},{y,0,h}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[1,{x,a+x1,b},{y,0,(h/(x1+a-b))(x-b)}]
]]]//Timing

FullSimplify[Total[{
(((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((((a-b))^2)+(c-d) (c+d)))/(8 (((a-b))^2))),
((a (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]))/(2 (-a+b))),
(((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((((a-b))^2)-(c^2)+(d^2)))/(8 (((a-b))^2)))
}],0<a<b&&c>0&&d>0]

Centroid

Integrate

Integrate[{x,y}Boole[y≥0&&p x+(b^2) y+((a^2)-(c^2)+(d^2)) y≤b (p+2 a y)&&p+2 a y≥2 b y&&p x+2 a b y≥((a^2)+(b^2)+(c^2)-(d^2)) y],{x,-∞,∞},{y,-∞,∞},Assumptions->0<a<b&&c>0&&d>0&&p>0]

Pick correct piece of integral

Block[{a=1,b=1.5,c=.6,d=.7},(1/(-(((a+b) p)/(4 (a-b))))){{(((a^4) p-4 (a^3) b p+3 (a^2) (b^2) p+2 a (b^3) p-2 (b^4) p+3 (a^2) (c^2) p-3 (a^2) (d^2) p)/(12 (a-b) ((a^2)-2 a b+(b^2)-(c^2)+(d^2)))),((-3 (a^2) b p+3 (b^3) p+2 a (c^2) p+b (c^2) p-2 a (d^2) p-b (d^2) p)/(24 (((a-b))^2))),((-(a^4) p+4 (a^3) b p-9 (a^2) (b^2) p+10 a (b^3) p-4 (b^4) p+3 (a^2) (c^2) p-6 a b (c^2) p-3 (a^2) (d^2) p+6 a b (d^2) p)/(12 (a-b) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)))),((6 (b^2) c p-2 (c^3) p-3 b (d^2) p+2 c (d^2) p)/(24 (c^2))),((6 b (c^3) p-4 (c^4) p+3 (b^2) (d^2) p-6 b c (d^2) p+3 (c^2) (d^2) p)/(12 c (d^2))),((-2 (b^3) (c^2) p+3 (b^2) c (d^2) p-3 b (c^2) (d^2) p+(c^3) (d^2) p)/(6 (d^2) (-2 (c^2)+(d^2)))),(-(a^6) p+6 (a^4) (b^2) p-6 (a^3) (b^3) p-3 (a^2) (b^4) p+6 a (b^5) p-2 (b^6) p+4 (a^4) (c^2) p-4 (a^3) b (c^2) p+2 a (b^3) (c^2) p-2 (b^4) (c^2) p-3 (a^2) (c^4) p-4 (a^4) (d^2) p+4 (a^3) b (d^2) p-2 a (b^3) (d^2) p+2 (b^4) (d^2) p+6 (a^2) (c^2) (d^2) p-3 (a^2) (d^4) p)/(12 (a-b) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)) ((a^2)-2 a b+(b^2)-(c^2)+(d^2))),
(1/(12 (a-b) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)) ((a^2)-2 a b+(b^2)-(c^2)+(d^2))))((a^6) p-6 (a^3) (b^3) p+3 (a^2) (b^4) p+6 a (b^5) p-4 (b^6) p+4 (a^4) (c^2) p+2 (a^3) b (c^2) p-6 (a^2) (b^2) (c^2) p-4 a (b^3) (c^2) p+4 (b^4) (c^2) p+3 (a^2) (c^4) p+6 a b (c^4) p-4 (a^4) (d^2) p-2 (a^3) b (d^2) p+6 (a^2) (b^2) (d^2) p+4 a (b^3) (d^2) p-4 (b^4) (d^2) p-6 (a^2) (c^2) (d^2) p-12 a b (c^2) (d^2) p+3 (a^2) (d^4) p+6 a b (d^4) p),(1/(24 (((a-b))^2) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)) ((a^2)-2 a b+(b^2)-(c^2)+(d^2))))(2 (a^7) p-2 (a^6) b p-12 (a^4) (b^3) p+18 (a^3) (b^4) p+6 (a^2) (b^5) p-20 a (b^6) p+8 (b^7) p+8 (a^5) (c^2) p-4 (a^4) b (c^2) p-16 (a^3) (b^2) (c^2) p+4 (a^2) (b^3) (c^2) p+16 a (b^4) (c^2) p-8 (b^5) (c^2) p+6 (a^3) (c^4) p+6 (a^2) b (c^4) p-12 a (b^2) (c^4) p-2 (a^5) (d^2) p+4 (a^4) b (d^2) p-8 (a^3) (b^2) (d^2) p+8 (a^2) (b^3) (d^2) p+2 a (b^4) (d^2) p-4 (b^5) (d^2) p-12 (a^2) b (c^2) (d^2) p+12 (b^3) (c^2) (d^2) p+6 a (c^4) (d^2) p+3 (a^2) b (d^4) p-3 (b^3) (d^4) p-6 a (c^2) (d^4) p-3 b (c^2) (d^4) p+2 a (d^6) p+b (d^6) p)},{((2 a (p^2)+b (p^2))/(24 (((a-b))^2))),((3 b (p^2)-2 c (p^2))/(24 (c^2))),((3 a (p^2)+c (p^2))/(24 (c^2))),((7 (a^2) (p^2)-2 a b (p^2)-5 (b^2) (p^2)+3 (c^2) (p^2))/(48 (((a-b))^3))),((6 b c (p^2)+2 (c^2) (p^2)-3 (d^2) (p^2))/(48 (c^3))),(((a^2) (p^2)+4 a b (p^2)-5 (b^2) (p^2)+3 (c^2) (p^2)-3 (d^2) (p^2))/(48 (((a-b))^3))),(((a^2) (p^2)+4 a b (p^2)-5 (b^2) (p^2)-3 (c^2) (p^2)+3 (d^2) (p^2))/(48 (((a-b))^3)))},{(((a^4) p-4 (a^3) b p+3 (a^2) (b^2) p+2 a (b^3) p-2 (b^4) p+3 (a^2) (c^2) p-3 (a^2) (d^2) p)/(12 (a-b) ((a^2)-2 a b+(b^2)-(c^2)+(d^2)))),((-3 (a^2) b p+3 (b^3) p+2 a (c^2) p+b (c^2) p-2 a (d^2) p-b (d^2) p)/(24 (((a-b))^2))),((-(a^4) p+4 (a^3) b p-9 (a^2) (b^2) p+10 a (b^3) p-4 (b^4) p+3 (a^2) (c^2) p-6 a b (c^2) p-3 (a^2) (d^2) p+6 a b (d^2) p)/(12 (a-b) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)))),((6 (b^2) c p-2 (c^3) p-3 b (d^2) p+2 c (d^2) p)/(24 (c^2))),((6 b (c^3) p-4 (c^4) p+3 (b^2) (d^2) p-6 b c (d^2) p+3 (c^2) (d^2) p)/(12 c (d^2))),((-2 (b^3) (c^2) p+3 (b^2) c (d^2) p-3 b (c^2) (d^2) p+(c^3) (d^2) p)/(6 (d^2) (-2 (c^2)+(d^2)))),(-(a^6) p+6 (a^4) (b^2) p-6 (a^3) (b^3) p-3 (a^2) (b^4) p+6 a (b^5) p-2 (b^6) p+4 (a^4) (c^2) p-4 (a^3) b (c^2) p+2 a (b^3) (c^2) p-2 (b^4) (c^2) p-3 (a^2) (c^4) p-4 (a^4) (d^2) p+4 (a^3) b (d^2) p-2 a (b^3) (d^2) p+2 (b^4) (d^2) p+6 (a^2) (c^2) (d^2) p-3 (a^2) (d^4) p)/(12 (a-b) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)) ((a^2)-2 a b+(b^2)-(c^2)+(d^2))),(1/(12 (a-b) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)) ((a^2)-2 a b+(b^2)-(c^2)+(d^2))))((a^6) p-6 (a^3) (b^3) p+3 (a^2) (b^4) p+6 a (b^5) p-4 (b^6) p+4 (a^4) (c^2) p+2 (a^3) b (c^2) p-6 (a^2) (b^2) (c^2) p-4 a (b^3) (c^2) p+4 (b^4) (c^2) p+3 (a^2) (c^4) p+6 a b (c^4) p-4 (a^4) (d^2) p-2 (a^3) b (d^2) p+6 (a^2) (b^2) (d^2) p+4 a (b^3) (d^2) p-4 (b^4) (d^2) p-6 (a^2) (c^2) (d^2) p-12 a b (c^2) (d^2) p+3 (a^2) (d^4) p+6 a b (d^4) p),(1/(24 (((a-b))^2) ((a^2)-2 a b+(b^2)+(c^2)-(d^2)) ((a^2)-2 a b+(b^2)-(c^2)+(d^2))))(2 (a^7) p-2 (a^6) b p-12 (a^4) (b^3) p+18 (a^3) (b^4) p+6 (a^2) (b^5) p-20 a (b^6) p+8 (b^7) p+8 (a^5) (c^2) p-4 (a^4) b (c^2) p-16 (a^3) (b^2) (c^2) p+4 (a^2) (b^3) (c^2) p+16 a (b^4) (c^2) p-8 (b^5) (c^2) p+6 (a^3) (c^4) p+6 (a^2) b (c^4) p-12 a (b^2) (c^4) p-2 (a^5) (d^2) p+4 (a^4) b (d^2) p-8 (a^3) (b^2) (d^2) p+8 (a^2) (b^3) (d^2) p+2 a (b^4) (d^2) p-4 (b^5) (d^2) p-12 (a^2) b (c^2) (d^2) p+12 (b^3) (c^2) (d^2) p+6 a (c^4) (d^2) p+3 (a^2) b (d^4) p-3 (b^3) (d^4) p-6 a (c^2) (d^4) p-3 b (c^2) (d^4) p+2 a (d^6) p+b (d^6) p)}}/.p->(Sqrt[((a (b^2)-(a^(2 ))b-a (c^2)+b (d^2))/(b-a))])]

Simplify

h=(η/(2(b-a)))

Block[{a=1,b=2,c=.6,d=.7},Block[{η=(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])},(1/((((a+b))/(4 (b-a)))η))NIntegrate[{x,y}Boole[ineq[x,y]],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,(η/(2 (b-a)))}]]]

Block[{a=1,b=1.5,c=.6,d=.7},{((3 (a^2) b-3 (b^3)-2 a (c^2)-b (c^2)+2 a (d^2)+b (d^2))/(6((a^2)-(b^2)))),(((b+2a))/(3(a+b)))((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a)))}]

Block[{a=1,b=1.5,c=.6,d=.7},{((3b(b^2-a^2)+2a(c^2-d^2)+b(c^2-d^2))/(6((b^2)-(a^2)))),(((b+2a))/(3(a+b)))((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a)))}]

Block[{a=1,b=1.5,c=.6,d=.7},{((3b(b^2-a^2)+(2a+b)(c^2-d^2))/(6((b^2)-(a^2)))),(((b+2a))/(3(a+b)))((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a)))}]

Block[{a=1,b=2,c=.6,d=.7},{(b/2)+(((2a+b)(c^2-d^2))/(6((b^2)-(a^2)))),(((b+2a))/(3(a+b)))((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a)))}]

Block[{a=1,b=2,c=.7,d=.6},Block[{η=(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])},(1/((((a+b))/(4 (b-a)))η))NIntegrate[{x,y}Boole[ineq[x,y]],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,(η/(2 (b-a)))}]]]

Block[{a=1,b=2,c=.7,d=.6},{(b/2)+(((2a+b)Abs[d^2-c^2])/(6((b^2)-(a^2)))),(((b+2a))/(6((b^2)-(a^2))))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])}]

Special Cases

FullSimplify[{(b/2)+(((2a+b)Abs[d^2-c^2])/(6((b^2)-(a^2)))),(((b+2a))/(6((b^2)-(a^2))))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])}/.d->c,0<a<b&&c>0&&d>0]

Simplify[Limit[FullSimplify[{(b/2)+(((2a+b)Abs[d^2-c^2])/(6((b^2)-(a^2)))),(((b+2a))/(6((b^2)-(a^2))))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])}/.d->c,0<a<b],b->a],c>0]

Triangular Region

x

(cx1=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x,{x,0,x1},{y,0,(h/x1)x}]
]]])//Timing

(cx2=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x,{x,x1,x1+a},{y,0,h}]
]]])//Timing

(cx3=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x,{x,a+x1,b},{y,0,(h/(x1+a-b))(x-b)}]
]]])//Timing

With[{A=-(((a+b) (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]))/(4 (a-b)))},FullSimplify[(1/A)Total[{cx1,cx2,cx3}],0<a<b&&c>0&&d>0]]//FullSimplify

y

(cy1=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y,{x,0,x1},{y,0,(h/x1)x}]
]]])//Timing

(cy2=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y,{x,x1,x1+a},{y,0,h}]
]]])//Timing

(cy3=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y,{x,a+x1,b},{y,0,(h/(x1+a-b))(x-b)}]
]]])//Timing

With[{A=-(((a+b) (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]))/(4 (a-b)))},FullSimplify[(1/A)Total[{cy1,cy2,cy3}],0<a<b&&c>0&&d>0]]//FullSimplify

Boole

Integrate x

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x Boole[y<(h/x1)x&&0≤x<x1&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x Boole[x1≤x<a+x1&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x Boole[y<(h/(x1+a-b))(x-b)&&a+x1≤x<b&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{A=-(((a+b) (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]))/(4 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[(1/A)(-((a (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((a-b) b-(c^2)+(d^2)))/(4 (((a-b))^2))))]]]

Integrate y

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y Boole[y<(h/x1)x&&0≤x<x1&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y Boole[x1≤x<a+x1&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y Boole[y<(h/(x1+a-b))(x-b)&&a+x1≤x<b&&0≤y≤h],{x,-∞,∞},{y,-∞,∞}]
]]]//Timing

With[{A=-(((a+b) (Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]))/(4 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[(1/A)((((a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) ((((a-b))^2)+(c-d) (c+d)))/(48 (((a-b))^3)))+-((a (a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d))/(8 (((a-b))^2)))+(((a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) ((((a-b))^2)-(c^2)+(d^2)))/(48 (((a-b))^3))))]]]

Numerical Check

Block[{a=1,b=2,c=.7,d=.6},Block[{η=(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])},(1/((((a+b))/(4 (b-a)))η))NIntegrate[{x,y}Boole[ineq[x,y]],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,(η/(2 (b-a)))}]]]

Block[{a=1,b=2,c=.7,d=.6},{(b/2)+(((2a+b)(c^2-d^2))/(6((b^2)-(a^2)))),(((b+2a))/(6((b^2)-(a^2))))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])}]

Block[{a=1,b=2,c=.3,d=.8},Block[{η=(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])},(1/((((a+b))/(4 (b-a)))η))NIntegrate[{x,y}Boole[ineq[x,y]],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,(η/(2 (b-a)))}]]]

Block[{a=1,b=2,c=.3,d=.8},{(b/2)+(((2a+b)(c^2-d^2))/(6((b^2)-(a^2)))),(((b+2a))/(6((b^2)-(a^2))))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])}]

InertiaTensor

AreaInertiaTensor[{x,y}]

Triangular Region

y y

(yy1=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y^2,{x,0,x1},{y,0,(h/x1)x}]
]]])//Timing

(yy2=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y^2,{x,x1,x1+a},{y,0,h}]
]]])//Timing

(yy3=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[y^2,{x,a+x1,b},{y,0,(h/(x1+a-b))(x-b)}]
]]])//Timing

FullSimplify[Total[{yy1,yy2,yy3}],0<a<b&&c>0&&d>0]

Factor[Total[{yy1,yy2,yy3}]]

-x y

(xy1=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[-Integrate[x y,{x,0,x1},{y,0,(h/x1)x}]
]]])//Timing

(xy2=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[-Integrate[x y,{x,x1,x1+a},{y,0,h}]
]]])//Timing

(xy3=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[-Integrate[x y,{x,a+x1,b},{y,0,(h/(x1+a-b))(x-b)}]
]]])//Timing

Factor[Total[{xy1,xy2,xy3}]]

x x

(xx1=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x^2,{x,0,x1},{y,0,(h/x1)x}]
]]])//Timing

(xx2=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x^2,{x,x1,x1+a},{y,0,h}]
]]])//Timing

(xx3=With[{h=((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])/(2(b-a))),x1=-(((((a-b))^2)+(c^2)-(d^2))/(2 (a-b))),x2=-(((((a-b))^2)-(c^2)+(d^2))/(2 (a-b)))},Assuming[0<a<b&&c>0&&d>0,FullSimplify[Integrate[x^2,{x,a+x1,b},{y,0,(h/(x1+a-b))(x-b)}]
]]])//Timing

Factor[Total[{xx1,xx2,xx3}]]

Factor[((a^5)-(a^4) b+6 (a^3) (b^2)-6 (a^2) (b^3)-7 a (b^4)+7 (b^5)-8 (a^2) b (c^2)+4 a (b^2) (c^2)+4 (b^3) (c^2)+3 a (c^4)+b (c^4)+8 (a^2) b (d^2)-4 a (b^2) (d^2)-4 (b^3) (d^2)-6 a (c^2) (d^2)-2 b (c^2) (d^2)+3 a (d^4)+b (d^4))]

Matrix

{{-(((3 a+b) ((((a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)))^(3/2)))/(96 (((a-b))^3))),(1/(96 (((a-b))^3)))(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2))},{(1/(96 (((a-b))^3)))(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2)),-(1/(96 (((a-b))^3)))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((a^5)-(a^4) b+6 (a^3) (b^2)-6 (a^2) (b^3)-7 a (b^4)+7 (b^5)-8 (a^2) b (c^2)+4 a (b^2) (c^2)+4 (b^3) (c^2)+3 a (c^4)+b (c^4)+8 (a^2) b (d^2)-4 a (b^2) (d^2)-4 (b^3) (d^2)-6 a (c^2) (d^2)-2 b (c^2) (d^2)+3 a (d^4)+b (d^4))}}//MatrixForm

(({{-(((3 a+b) ((((a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)))^(3/2)))/(96 (((a-b))^3))), (((a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2)))/(96 (((a-b))^3)))}, {(((a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2)))/(96 (((a-b))^3))), -(((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((a^5)-(a^4) b+6 (a^3) (b^2)-6 (a^2) (b^3)-7 a (b^4)+7 (b^5)-8 (a^2) b (c^2)+4 a (b^2) (c^2)+4 (b^3) (c^2)+3 a (c^4)+b (c^4)+8 (a^2) b (d^2)-4 a (b^2) (d^2)-4 (b^3) (d^2)-6 a (c^2) (d^2)-2 b (c^2) (d^2)+3 a (d^4)+b (d^4)))/(96 (((a-b))^3)))}}))

(({{-(((3 a+b) ((((a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)))^(3/2)))/(96 (((a-b))^3))), (((a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d)( 2 b (2 (a^2)+(c^2))-(a+b) (2 (b^2)+3 (c^2))+(3 a+b) (d^2)))/(96 (((a-b))^3)))}, {(((a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) ( 2 b (2 (a^2)+(c^2))-(a+b) (2 (b^2)+3 (c^2))+(3 a+b) (d^2)))/(96 (((a-b))^3))), -(((Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((a^5)-(a^4) b+6 (a^3) (b^2)-6 (a^2) (b^3)-7 a (b^4)+7 (b^5)-8 (a^2) b (c^2)+4 a (b^2) (c^2)+4 (b^3) (c^2)+3 a (c^4)+b (c^4)+8 (a^2) b (d^2)-4 a (b^2) (d^2)-4 (b^3) (d^2)-6 a (c^2) (d^2)-2 b (c^2) (d^2)+3 a (d^4)+b (d^4)))/(96 (((a-b))^3)))}}))

Numerical Check

Block[{a=1,b=2,c=.7,d=.6},Block[{η=(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])},NIntegrate[{{(y^2),-x y},{-x y,(x^2)}}Boole[ineq[x,y]],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,(η/(2 (b-a)))}]]]

Block[{a=1,b=2,c=.7,d=.6},{{-(((3 a+b) ((((a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)))^(3/2)))/(96 (((a-b))^3))),(1/(96 (((a-b))^3)))(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2))},{(1/(96 (((a-b))^3)))(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2)),-(1/(96 (((a-b))^3)))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((a^5)-(a^4) b+6 (a^3) (b^2)-6 (a^2) (b^3)-7 a (b^4)+7 (b^5)-8 (a^2) b (c^2)+4 a (b^2) (c^2)+4 (b^3) (c^2)+3 a (c^4)+b (c^4)+8 (a^2) b (d^2)-4 a (b^2) (d^2)-4 (b^3) (d^2)-6 a (c^2) (d^2)-2 b (c^2) (d^2)+3 a (d^4)+b (d^4))}}]

Block[{a=1,b=2,c=.3,d=.8},Block[{η=(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)])},NIntegrate[{{(y^2),-x y},{-x y,(x^2)}}Boole[ineq[x,y]],{x,0,Max[a+(((((a-b))^2)+(c^2)-(d^2))/(2 (b-a))),b]},{y,0,(η/(2 (b-a)))}]]]

Block[{a=1,b=2,c=.3,d=.8},{{-(((3 a+b) ((((a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)))^(3/2)))/(96 (((a-b))^3))),(1/(96 (((a-b))^3)))(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2))},{(1/(96 (((a-b))^3)))(a-b-c-d) (a-b+c-d) (a-b-c+d) (a-b+c+d) (4 (a^2) b-2 a (b^2)-2 (b^3)-3 a (c^2)-b (c^2)+3 a (d^2)+b (d^2)),-(1/(96 (((a-b))^3)))(Sqrt[(a-b+c-d) (a-b-c+d) (a-b+c+d) (-a+b+c+d)]) ((a^5)-(a^4) b+6 (a^3) (b^2)-6 (a^2) (b^3)-7 a (b^4)+7 (b^5)-8 (a^2) b (c^2)+4 a (b^2) (c^2)+4 (b^3) (c^2)+3 a (c^4)+b (c^4)+8 (a^2) b (d^2)-4 a (b^2) (d^2)-4 (b^3) (d^2)-6 a (c^2) (d^2)-2 b (c^2) (d^2)+3 a (d^4)+b (d^4))}}]