Page 1 of 1

A simple 2D plot question

Posted: Thu Jan 21, 2010 9:48 pm
by dpass
If I want to plot Y against X, for eaxmple

s=sin(x)*cos(x*x)*tan(2*x)
y=sin(s*s+s*x+s^2)

I don't want to type sin(x)*cos(x*x)*tan(2*x) for each s in y. How do I do that? So basically, I am asking if Dplot support automatic variable substitution (in this case replace every s in y with sin(x)*cos(x*x)*tan(2*x)).

Thanks.

Posted: Fri Jan 22, 2010 4:46 pm
by DPlotAdmin
You can't do it in one step (w/o the substitution you already mentioned). The easiest way to do this is using Generate>Y=f(X), then Edit>Operate on Y.

Y=f(X):
Y=sin(x)*cos(x*x)*tan(2*x)

Operate on Y:
Y=sin(y*y+y*x+y^2)

But no matter how you do this, you're going to get some instabilities at x=pi/4, 3*pi/4, 5*pi/4, etc. - which I'd guess you already know.