Cardioid

Author

Eric W. Weisstein
June 6, 2014

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneCurves/Cardioid.nb.

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

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

Definition

eqn[a_][x_,y_]:=-(a^2) (y^2)+2 a x ((x^2)+(y^2))+((((x^2)+(y^2)))^2)

Expand[eqn]

eqn=2 a (x^3)+(x^4)-(a^2) (y^2)+2 a x (y^2)+2 (x^2) (y^2)+(y^4);

Plots

+ Sign

PolarPlot[1+Cos[t],{t,-Pi,Pi},AspectRatio->Automatic,Ticks->None,PlotStyle->Red]

- Sign

PolarPlot[1-Cos[t],{t,-Pi,Pi},AspectRatio->Automatic,Ticks->None,PlotStyle->Red]

V6

ContourPlot[eqn[1][x,y]==0,{x,-2,.3},{y,-1.3,1.3},AspectRatio->Automatic]

Animation

Show[EpicycloidFrames[{1,1},Table[x,{x,0,2Pi-.01,2Pi/5}]],
ImageSize->200]

Show/@(movie=Epicycloid[{1,1},{0,2Pi-.001,2Pi/40.}])

<<Utilities`GIF`

Export[gifs<>"cardioid.gif",movie]//Timing

Equations

Cartesian

eqn=Eliminate[{
x==a Cos[t](1-Cos[t]),
y==a Sin[t](1-Cos[t]),
Cos[t]^2+Sin[t]^2==1}/.{Cos[t]->cost,Sin[t]->sint},
{cost,sint}]//FullSimplify

eqn=((x^2)+(y^2)) (2 a x+(x^2)+(y^2))==(a^2) (y^2);

FullSimplify[Expand[Subtract@@eqn]]

FullSimplify[Expand[((((x^2)+(y^2)+a x))^2)-(a^2)((x^2)+(y^2))]]

r=a(1+Cos[t])/.{Cos[t]->c,Sin[t]->s}

eqns=Numerator[Together[{r c-x,r s-y,x^2+y^2-r^2,c^2+s^2-1}]]

(gbs=Factor/@GroebnerBasis[eqns,{x,y},{c,s},MonomialOrder->EliminationOrder])//Timing

FullSimplify[%]

Cesaro

a (1 - Cos[t]){Cos[t], Sin[t]}

ParametricPlot[(1-Cos[t]){Cos[t],Sin[t]},{t,0,2π-1},ImageSize->Small,
Epilog->{Red,PointSize[.03],Point[(1-Cos[t]){Cos[t],Sin[t]}/.t->.5]}]

a ArcLength[{Cos[t],Sin[t]}(1-Cos[t]),t,Assumptions->a>0&&0<t<2π]

FullSimplify[Curvature[a (1-Cos[t]){Cos[t],Sin[t]},t],a>0&&0<t<2π]

{s==8 a ((Sin[(t/4)])^2),κ==((3 )/(4 a Sin[(t/2)]))==(3/(8 a Sin[(t/4)]Cos[(t/4)]))}

gb=Factor/@GroebnerBasis[{s-8a (sin^2),8 a cos sin κ-3,sin^2+cos^2-1},{κ,s},{sin,cos}]

Factor[gb[[1]]/.κ->1/ρ]//Numerator

a{Cos[t],Sin[t]}(1+Cos[t])

a ArcLength[{Cos[t],Sin[t]}(1+Cos[t]),t,Assumptions->a>0&&0<t<2π]

FullSimplify[Curvature[a{Cos[t],Sin[t]}(1+Cos[t]),t],a>0&&0<t<π]

{s==4 a Sin[(t/2)],κ==((3 )/(4 a Cos[(t/2)]))}

gb=GroebnerBasis[{s-4a sin,4 a cos κ-3,sin^2+cos^2-1},{κ,s},{sin,cos}]

Factor[gb[[1]]/.κ->1/ρ]//Numerator

2a{Cos[t],Sin[t]}(1+Cos[t])

ParametricPlot[2{Cos[t],Sin[t]}(1+Cos[t]),{t,0,2π-.5},ImageSize->Small,Epilog->{Red,PointSize[.03],Point[2{Cos[t],Sin[t]}(1+Cos[t])/.t->.5]}]

a ArcLength[2{Cos[t],Sin[t]}(1+Cos[t]),t,Assumptions->a>0&&0<t<2π]

FullSimplify[Curvature[2a{Cos[t],Sin[t]}(1+Cos[t]),t],a>0&&0<t<π]

{s==8 a Sin[(t/2)],κ==((3 )/(8 a Cos[(t/2)]))}

gb=GroebnerBasis[{s-8a sin,8 a cos κ-3,sin^2+cos^2-1},{κ,s},{sin,cos}]

Factor[gb[[1]]/.κ->1/ρ]//Numerator

Properties

cardioid=a{Cos[t],Sin[t]}(1-Cos[t]);

Arc Length Function

FullSimplify[ArcLength[cardioid,t],a>0&&0<t<2π]

Arc Length

%/.t->0

%% /. t->2π

Area

Numeric

Parametric

With[{x=Cos[#](1-Cos[#])&,y=Sin[#](1-Cos[#])&},a Integrate[Abs[y[t]x'[t]-x[t]y'[t]],{t,0,2π}]]/2

Area[1-Cos[t],{t,0,2π}]

Area[(1-Cos[t]){Cos[t],Sin[t]},{t,0,2π}]

Cartesian

Assuming[a>0,Area[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2),{x,y}]]

With[{a=1},RegionPlot[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2),{x,-2,.3},{y,-1.3,1.3},AspectRatio->Automatic]]

Integrate[Boole[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2)],{x,-∞,∞},{y,-∞,∞},Assumptions->a>0]//Timing

Integrate[Boole[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2)],{y,-∞,∞},{x,-∞,∞},Assumptions->a>0]//Timing

FullSimplify[-Root[-(a^2) (y^2)+(y^4)+2 a (y^2) #1+2 (y^2) ((#1)^2)+2 a ((#1)^3)+((#1)^4)&,1]+Root[-(a^2) (y^2)+(y^4)+2 a (y^2) #1+2 (y^2) ((#1)^2)+2 a ((#1)^3)+((#1)^4)&,2],-3a/4(Sqrt[3])<y<3a/4(Sqrt[3])]

With[{a=1},Integrate[Boole[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2)],{x,-∞,∞},{y,-∞,∞}]]//Timing

With[{a=1},Integrate[Boole[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2)],{y,-∞,∞},{x,-∞,∞}]]//Timing

FullSimplify[(-Root[-(y^2)+(y^4)+2 (y^2) #1+2 (y^2) ((#1)^2)+2 ((#1)^3)+((#1)^4)&,1]+Root[-(y^2)+(y^4)+2 (y^2) #1+2 (y^2) ((#1)^2)+2 ((#1)^3)+((#1)^4)&,2]),-3/4(Sqrt[3])<y<3/4(Sqrt[3])]

Area Moment of Inertia

PolarPlot[1-Cos[t],{t,0,2π},ImageSize->150]

Numeric

With[{a=1},NIntegrate[{{(y^2),-x y},{-x y,(x^2)}}Boole[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2)],{x,-2,.5},{y,-1.5,1.5}]]

Polar

AreaInertiaTensor[a(1-Cos[q]),{q,0,2π}]

{{(y^2),-x y},{-x y,(x^2)}}/.{x->r Cos[t],y->r Sin[t]}//FullSimplify

Integrate[{{(r^2) ((Sin[t])^2),-(r^2) Cos[t] Sin[t]},{-(r^2) Cos[t] Sin[t],(r^2) ((Cos[t])^2)}}r,{t,0,2π},{r,0,1-Cos[t]}]//FullSimplify

Centroid

Numeric

With[{a=1},RegionPlot[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2),{x,-2,.5},{y,-1.5,1.5}]]

With[{a=1},NIntegrate[{x,y}Boole[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2)],{x,-2,.5},{y,-1.5,1.5}]]/((3π)/2)

Polar

Centroid[a(1-Cos[t]),{t,0,2π}]

Integrate[r{Cos[t],Sin[t]}r,{t,0,2π},{r,0,a(1-Cos[t])}]/((3π (a^2))/2)

Cartesian

Assuming[a>0,Centroid[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2),{x,y}]]

Assuming[a>0,Centroid[((x^2)+(y^2)) (2 a x+(x^2)+(y^2))<(a^2) (y^2),{y,x}]]//Timing

Parametric

...not quite right...

With[{f=(a(1-Cos[#])Cos[#])&,g=a(1-Cos[#])Sin[#]&},
(1/2)Integrate[(g'[t]f[t]-f'[t]g[t]){f[t],g[t]},{t,0,2π}]/((3π (a^2))/2)
]

Cesaro Equation

CesaroEquation[{Cos[t](1+Cos[t]),Sin[t](1+Cos[t])},t,{s,k}]

Curvature

Parametric

FullSimplify[Curvature[cardioid,t],a>0&&0<t<2π]

Polar

FullSimplify[Curvature[a (1-Cos[q]),q],a>0&&0<q<2π]

Implicit

Curvature[eqn,{x,y}]

SortBy[FullSimplify[Curvature[eqn,{x,y}],a>0&&(x|y)∈Reals],ByteCount]

ByteCount/@%

FullSimplify[Refine[Factor[%121],a>0]]

ByteCount/@%

Simplify[((3 (a^2) (a (y^2)-2 x ((x^2)+(y^2))))/(2 (Sqrt[2]) (((-a (x^3)+a (a-x) (y^2)))^(3/2))))/.Thread[{x,y}->cardioid],0<t<2π&&a>0]

Differential Equation

xy=(x^2+y[x]^2+a x)^2-a^2(x^2+y[x]^2)

eqs=Table[D[xy,{x,i}],{i,0,3}];

gb=Factor/@GroebnerBasis[eqs,{x,y[x],y'[x],y''[x],y'''[x]},{a},MonomialOrder->EliminationOrder]

TraditionalForm[gb[[1]]==0]

Solve[xy==0,y[x]]

Inflection Points

Simplify[InflectionPoints[eqn,{x,y}],a>0]

Singularities

SingularPoints[eqn,{x,y}]

Slope

Slope[a (1-Cos[t]){Cos[t],Sin[t]},t]//FullSimplify

Slope[(x^2+y^2+a x)^2==a^2(x^2+y^2),{x,y}]//FullSimplify

Slope[(x^2+y^2+a x)^2==a^2(x^2+y^2),{x,y}]//FullSimplify

Slope[a (1-Cos[q]),q]//FullSimplify

SpecialAffineCurvature

FullSimplify[SpecialAffineCurvature[cardioid,t],a>0&&0<t<2π]

Tangential Angle

FullSimplify[TangentialAngle[cardioid,t],a>0&&0<t<2π]

Envelopes

<<Graphics`ImplicitPlot`
<<Graphics`Graphics`

CardioidCircle[i_,n_]:=Module[{k=(Pi/2+2Pi i/n)//N},Circle[{Cos[k],Sin[k]},Sqrt[2(1-Sin[k])]]]

CardioidEnvelope[n_]:=Module[{},Table[CardioidCircle[i,n],{i,1,n}]]

CardioidCenter:=Circle[{0,0},1]

s=3;
Export[path<>"cardenv.gif",
	Table[Show[Graphics[{CardioidEnvelope[i],{Thickness[.01],CardioidCenter}}],
  AspectRatio->Automatic,PlotRange->{{-3,3},{-3,2}}],{i,25}],"GIF"]

Show[Graphics[{CardioidEnvelope[20],{Thickness[.01],CardioidCenter}}],AspectRatio->Automatic]

Vector Properties

parm=a (1-Cos[t]){Cos[t],Sin[t]};
assum=a>0&&0<t<2π;
xform=Abs[x_]^(n_/;Mod[n,2]==0):>x^n;

VectorLength

Assuming[assum,FullSimplify[Norm[parm]]]/.xform

NormalVector

Assuming[assum,FullSimplify[NormalVector[parm,t]]]/.xform

TangentVector

Assuming[assum,FullSimplify[TangentVector[parm,t]]]/.xform