How can one do geometric constructions with unknown variables in Mathematica? If:
p[x_] := x^2 + 2 x - 3
Plot[p[r], {r, -2 r, 2 r}]
Then error:
Plot::plln: Limiting value -2 r in {r,-2 r,2 r} is not a machine-sized real number. >>
How can one do geometric constructions with unknown variables in Mathematica? If:
p[x_] := x^2 + 2 x - 3
Plot[p[r], {r, -2 r, 2 r}]
Then error:
Plot::plln: Limiting value -2 r in {r,-2 r,2 r} is not a machine-sized real number. >>
Hi,
I am not sure what you want to achieve, but Plot is a procedure which needs fixed bounds for the range, such as:
p[x_] := x^2 + 2 x - 3;
Plot[p[r], {r, -20 , 20 }]
If you want to try different ones you might want to use Manipulate:
Manipulate[Plot[p[r], {r, -2 RR , 2 RR }], {{RR, 1}, 0.1, 20}]
You will get a Slider and get get something like this:

Hope this helps,
Marco
I’m not sure this is considered good programming practice in mathematica but perhaps you could do the following:
Table[Plot[p[x], {x, -2 r, 2 r}],{r,1,10}]
where r spans 1 through 10 in steps of 1.
This was probably a poor example of what I want to do. But I think the issue is Plot won’t attempt to decide if a function can be plotted without numerical values.
For example f(x)=x is a known ‘shape’ over any domain.
Instead of assigning numerical input values can we just define the domain of x and/or exclude certain problem values? I noticed the Plot[ ,{x}?reg] but not sure how it works.
Edit: p.s. the Manipulate idea is a good workaround