5
$\begingroup$

I would like to obtain a curve that is parallel to the function:

 y(x) = -a/(x^2 + b)

I have tried to calculate the said curve by solving parametric equations, but as I tried to return to the Cartesian coordinates, the Eliminate instruction seems not to work (does not converge):

   Assuming[{a > 0, b > 0, d > 0}, 
 Eliminate[x == t + (2 a d t)/((b + t^2)^2 Sqrt[1 + (4 a^2 t^2)/(b + t^2)^4]) &&
y == -(a/(b + t^2)) - d/Sqrt[1 + (4 a^2 t^2)/(b + t^2)^4], t]],

where d is the distance between the curves.

Is there an alternative way to obtain a curve that is parallel to the given function in Cartesian coordinates using Mathematica?

Thank you!

$\endgroup$
1

1 Answer 1

11
$\begingroup$
  • Use FrenetSerretSystem.
Clear[a, b, r, y];
a = 15;
b = 2;
y[x_] = -a/(x^2 + b);
{{κ}, {e1, e2}} = FrenetSerretSystem[{x, y[x]}, x];
r = 1/5;
ParametricPlot[{{x, y[x]}, {x, y[x]} + r*e2}, {x, -5, 5}]

the equation is

{x, y[x]} + r*e2

enter image description here

enter image description here

Or rotation the tengent vector {1,y'[x]} to {-y'[x], 1} and Normalize it as normal vector.

Clear[a, b, r, y];
a = 15;
b = 2;
y[x_] = -a/(x^2 + b);
r = 1/5;
ParametricPlot[{{x, y[x]}, {x, y[x]} + 
   r*Normalize@{-y'[x], 1}}, {x, -5, 5}]
  • Or
Clear[a, b, f, reg, dist, r];
a = 15;
b = 2;
f[x_] = -a/(x^2 + b);
reg = DiscretizeRegion@ImplicitRegion[y == f[x], {{x, -5, 5}, y}];
dist = SignedRegionDistance@reg;
r = 1/5;
Show[Region[reg, BaseStyle -> Red], 
 ContourPlot[dist@{x, y} == r, {x, -6, 6}, {y, -10, 10}]]

enter image description here

  • RegionDilation seems have bug, and ParametricRegion or Resolve seems not work.
$\endgroup$
3
  • $\begingroup$ Thanks, Do you know how I could obtain the equations in Cartesian coordinates of the parallel curve? $\endgroup$
    – F.Mark
    Sep 15, 2022 at 4:47
  • $\begingroup$ Thank, but that equation in the parametric form. I would like to obtain an equation like x^2+y^2=1 or similar to wolframalpha.com/input/?i=offset+curves. $\endgroup$
    – F.Mark
    Sep 15, 2022 at 11:32
  • $\begingroup$ @F.Mark I didn't know until now that you needed the implicit function form. It must be a hard task. $\endgroup$
    – cvgmt
    Sep 15, 2022 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.