A way to find the region such as the area is using $Integrate[]$, where you take the upper - lower or $f[x]-g[x]$, while the perimeter we add the upper and lower region after we found its arc length. However, I'm having trouble finding the area and perimeter using programming.
Given a function $areaPerimeter[f,g,x]$, I am trying to find if the curves intersect ie. $y=f(x)$ and $y=g(x)$.
Using $areaPerimeter[1/10 x^4 + x + 1, x^2 - 1, x]$, I need to display the plot and PlotLabels showing the ${area,perimeter}$ above the plot
My attempt:
areaPerimeter[f_, g_] :=
Plot[{f[x], g[x]}, {x, -2, 4}]
Then I indicated the parameters for the overall plot using Module
areaPerimeter[f_, g_, x_] := Module[{sols, xvals, min, max, p, l},
sols = NSolve[f == g, x, Reals];
xvals = x /. sols;
min = Min[xvals];
max = Max[xvals];
d = max - min;
If[Length[sols] == 0,
min = -5;
max = 5;
d = 0
];
If[Length[sols] == 1,
d = 10;
];
p = Plot[{f, g}, {x, min - 0.2*d, max + 0.2*d}];
l = ListPlot[{x, f} /. sols, PlotStyle -> Black];
Show[p, l]
]