Mathematical Applications: Distance, Midpoint,and Piecewise FunctionsA.1. Find the distance between the points (-2,3) and (1,-1).Answer: The equation to calculate the distance between thepoints (a,b) and (c,d) isd=√(𝑎−𝑐)2+(𝑏−𝑑)2So the distance between the points (-2,3) and (1,-1) isd=√(−2−1)2+(3−(−1))2=√32+42=52.Find the midpoint of the line segment joining the points (-2,3) and (1,-2)Answer:Themidpointofthepoints(a,b)and(c,d)is(𝑎+𝑐2,𝑏+𝑑2), so the midpoint of (-2,3) and (1,-1) is(−2+12,3−12) = (-1/2,1)The midpoint is (-1/2,1)G. The function of f(x) is defined as:f(x) =1.a.Findf(0), f(2), f(5)0 is in the range2≤x<1, so f(0)=-2*0+3=32 is in the range 1≤x≤2, so f(2)= 55 is in the rangex>2, so f(5)= 5^2+2=27b.Determine the domain of f(x)The domain is (-∞,∞)-2x+3if-2≤x<15if1≤x≤2x^2+2ifx>2