5

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!

Alexey Popkov
  • 61,809
  • 7
  • 149
  • 368
F.Mark
  • 599
  • 2
  • 8

1 Answers1

11
  • 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.
cvgmt
  • 72,231
  • 4
  • 75
  • 133
  • Thanks, Do you know how I could obtain the equations in Cartesian coordinates of the parallel curve? – F.Mark Sep 15 '22 at 04:47
  • Thank, but that equation in the parametric form. I would like to obtain an equation like x^2+y^2=1 or similar to https://www.wolframalpha.com/input/?i=offset+curves. – F.Mark Sep 15 '22 at 11:32
  • @F.Mark I didn't know until now that you needed the implicit function form. It must be a hard task. – cvgmt Sep 15 '22 at 12:03