Use the t-parametrized form from e.g., http://mathworld.wolfram.com/FoliumofDescartes.html
t <- seq(-50, 50, by=0.01) x <- 3*t/(1+t^3) y <- 3*t^2/(1+t^3) plot(x, y, xlim=c(-5, 5), ylim=c(-5, 5), type="l") (I'm limiting the plot to avoid the huge values that occur near t=-1) MW On Wed, May 18, 2016 at 1:58 PM, Steven Stoline <[email protected]> wrote: > Dear All: > > > can someone please help me to plot the *Folium of Descrates:** x^3+y^3=3xy > for x<-seq(-5,5,0.010) and **y<-seq(-5,5,0.010) * > <https://www.google.com/search?biw=1155&bih=597&q=R:+Folium+of+Descartes&spell=1&sa=X&ved=0ahUKEwiBrsnWpeTMAhUFKB4KHU5TD0EQvwUIGSgA> > > > with thanks > steve > > On Tue, May 17, 2016 at 9:07 AM, Gabor Grothendieck <[email protected] >> wrote: > >> Try this: >> >> y <- sign(x) * abs(x)^(1/5) >> >> On Tue, May 17, 2016 at 8:44 AM, Steven Stoline <[email protected]> >> wrote: >> > Dear All: >> > >> > >> > I am trying to plot the function f(x) = x^(1/5) for x=seq(-2,2,0.01). It >> > give me only the plot of f(x) for the positive part of x. I checked the >> > values of f(x), it is NaN for all negative values of x. >> > >> > *this is my code:* >> > >> > >> > x<-seq(-2,2,0.01) >> > y<- (x)^(1/5) >> > plot(x,y, type="l", lwd=3, xlab = " ", ylab = " ", col="blue") >> > abline(v=0, col="gray", lty=2, lwd=3) >> > abline(h=0, col="gray", lty=2, lwd=3) >> > >> > >> > >> > any help will be appreciated. >> > >> > >> > with many thanks >> > steve >> > -- >> > Steven M. Stoline >> > 1123 Forest Avenue >> > Portland, ME 04112 >> > [email protected] >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ >> > [email protected] mailing list >> > https://stat.ethz.ch/mailman/listinfo/r-sig-teaching >> >> >> >> -- >> Statistics & Software Consulting >> GKX Group, GKX Associates Inc. >> tel: 1-877-GKX-GROUP >> email: ggrothendieck at gmail.com >> > > > > -- > Steven M. Stoline > 1123 Forest Avenue > Portland, ME 04112 > [email protected] > > [[alternative HTML version deleted]] > > _______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-sig-teaching _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
