mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Miscellaneous Math (https://www.mersenneforum.org/forumdisplay.php?f=56)
-   -   Wagstaff Conjecture (https://www.mersenneforum.org/showthread.php?t=14454)

CRGreathouse 2010-12-29 19:20

[QUOTE=science_man_88;243837]Is there one where you can plot multiple expressions ?[/QUOTE]

Yes, look at the help for the function.

science_man_88 2010-12-29 20:09

[QUOTE=CRGreathouse;243839]Yes, look at the help for the function.[/QUOTE]

I only see ones that take 1 expression. but I don't know enough about it.

tells you I've been trying stuff with the exponents a while I knew the first 15 off the top of my head lol.

CRGreathouse 2010-12-29 21:11

I can't make sense of your first line, but the help can be accessed through ?ploth (or ?plot for the ASCII art version).

science_man_88 2010-12-29 22:13

[QUOTE=CRGreathouse;243865]I can't make sense of your first line, but the help can be accessed through ?ploth (or ?plot for the ASCII art version).[/QUOTE]

I don't see how theses can be used for multiple lines. on the same graph.only thing I can't find to do it in open office is the equivalent to PARI's Euler I think.

CRGreathouse 2010-12-30 01:26

From the User's Guide:
[quote]3.10.12 ploth(X = a, b, expr , {flags = 0}, {n = 0}): high precision plot of the function y = f (x)
represented by the expression expr , x going from a to b. This opens a specific window (which is
killed whenever you click on it), and returns a four-component vector giving the coordinates of the
bounding box in the form [xmin, xmax , ymin, ymax ].
Important note.: ploth may evaluate expr thousands of times; given the relatively low resolution
of plotting devices, few significant digits of the result will be meaningful. Hence you should keep
the current precision to a minimum (e.g. 9) before calling this function.
n specifies the number of reference point on the graph, where a value of 0 means we use the
hardwired default values (1000 for general plot, 1500 for parametric plot, and 15 for recursive plot).
If no flag is given, expr is either a scalar expression f (X), in which case the plane curve
y = f (X) will be drawn, or a vector [f1 (X), . . . , fk (X)], and then all the curves y = fi (X) will be
drawn in the same window.
The binary digits of flag mean:
• 1 = Parametric: parametric plot. Here expr must be a vector with an even number of
components. Successive pairs are then understood as the parametric coordinates of a plane curve.
Each of these are then drawn.
For instance:
ploth(X=0,2*Pi,[sin(X),cos(X)], "Parametric")
ploth(X=0,2*Pi,[sin(X),cos(X)])
ploth(X=0,2*Pi,[X,X,sin(X),cos(X)], "Parametric")
draw successively a circle, two entwined sinusoidal curves and a circle cut by the line y = x.
• 2 = Recursive: recursive plot. If this flag is set, only one curve can be drawn at a time,
i.e. expr must be either a two-component vector (for a single parametric curve, and the parametric
flag has to be set), or a scalar function. The idea is to choose pairs of successive reference points,
and if their middle point is not too far away from the segment joining them, draw this as a local
approximation to the curve. Otherwise, add the middle point to the reference points. This is fast,
and usually more precise than usual plot. Compare the results of
ploth(X=-1,1, sin(1/X), "Recursive")
ploth(X=-1,1, sin(1/X))
for instance. But beware that if you are extremely unlucky, or choose too few reference points,
you may draw some nice polygon bearing little resemblance to the original curve. For instance you
should never plot recursively an odd function in a symmetric interval around 0. Try
ploth(x = -20, 20, sin(x), "Recursive")
to see why. Hence, it’s usually a good idea to try and plot the same curve with slightly different
parameters.
229
The other values toggle various display options:
• 4 = no Rescale: do not rescale plot according to the computed extrema. This is used in
conjunction with plotscale when graphing multiple functions on a rectwindow (as a plotrecth
call):
s = plothsizes();
plotinit(0, s[2]-1, s[2]-1);
plotscale(0, -1,1, -1,1);
plotrecth(0, t=0,2*Pi, [cos(t),sin(t)], "Parametric|no_Rescale")
plotdraw([0, -1,1]);
This way we get a proper circle instead of the distorted ellipse produced by
ploth(t=0,2*Pi, [cos(t),sin(t)], "Parametric")
• 8 = no X axis: do not print the x-axis.
• 16 = no Y axis: do not print the y-axis.
• 32 = no Frame: do not print frame.
• 64 = no Lines: only plot reference points, do not join them.
• 128 = Points too: plot both lines and points.
• 256 = Splines: use splines to interpolate the points.
• 512 = no X ticks: plot no x-ticks.
• 1024 = no Y ticks: plot no y-ticks.
• 2048 = Same ticks: plot all ticks with the same length.
• 4096 = Complex: is a parametric plot but where each member of expr is considered a complex
number encoding the two coordinates of a point. For instance:
ploth(X=0,2*Pi,exp(I*X), "Complex")
ploth(X=0,2*Pi,[(1+I)*X,exp(I*X)], "Complex")
will draw respectively a circle and a circle cut by the line y = x.[/quote]

science_man_88 2010-12-30 01:34

[QUOTE=CRGreathouse;243898]From the User's Guide:[/QUOTE]

Thanks again, you are very very useful. so I'd need to make a Vec pointing to the vectors I want to plot by the looks of it. okay now the hard part is figuring a curve to plot for the minimum as close as possible. see if we might get closer still.

CRGreathouse 2010-12-30 01:38

[QUOTE=science_man_88;243899]so I'd need to make a Vec pointing to the vectors I want to plot by the looks of it.[/QUOTE]

Er, no.

science_man_88 2010-12-30 01:57

[QUOTE=CRGreathouse;243901]Er, no.[/QUOTE]

[QUOTE]or a vector [f1 (X), . . . , fk (X)], and then all the curves y = fi (X) will be
drawn in the same window.[/QUOTE]

then why this ?

retina 2010-12-30 02:42

[QUOTE=science_man_88;243836]the values I get back are under 1 if i go any lower in the last digit of the last exponent [CODE]1.78^exp(-Euler)^-[COLOR="Red"]1.8026[/COLOR] [/CODE]gives over 1 for 1 value, [CODE]1.78^exp(-Euler)^-[COLOR="Red"]1.8027[/COLOR] [/CODE]makes them all below 1[/QUOTE]Maybe you just need to add more digits.

Try: [COLOR="Red"]1.8026486875969201048629953936014631[/COLOR] instead. :tu:

[size=1]Isn't numerology such fun. You could just use [url=http://en.wikipedia.org/wiki/Lagrange_polynomial]interpolation[/url] to compute the next MP directly.[/size]

CRGreathouse 2010-12-30 02:46

[QUOTE=science_man_88;243903]then why this ?[/QUOTE]

That's a vector of *functions*, not a vector of *vectors*. Big difference.

science_man_88 2010-12-30 12:35

[QUOTE=retina;243909]Maybe you just need to add more digits.

Try: [COLOR="Red"]1.8026486875969201048629953936014631[/COLOR] instead. :tu:

[size=1]Isn't numerology such fun. You could just use [url=http://en.wikipedia.org/wiki/Lagrange_polynomial]interpolation[/url] to compute the next MP directly.[/size][/QUOTE]

Nope it failed to keep them all under 1. closest to that I can get to work is -1.80267698589 so far with 9 digits of precision in my answers.

now got it to -1.8026769850702


All times are UTC. The time now is 07:41.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.