the x-axis is between 0 and L

88 Views Asked by At

I have a function such as $f (x) = 1 + {x \over L}$ and I would like to graph this function, for $x$ between $0$ and $L$.

3

There are 3 best solutions below

0
On

Well, its graph is going to be a straight line (segment). Plugging in $x=0$ we get $f(0)=1$ and plugging in $x=L$ we get $f(L)=1+L/L=2$ (unless $L=0$, which, I guess, is excluded).

So the it's a line segment from the point $(0,1)$ to $(L,2)$.

0
On

This is a line with $y$-intercept $1$ and with slope $\frac{1}{L}$. Your plot will be a line from $(0, 1)$ to $(L, 2)$.

0
On

You can graph any functions using Geogebra. To do it in this software with using $L$ as a parameter you have to create a slider from the little button where is written $a=2$. You then enter your function on button command-line (just write $1+x/L$). The function will appear. You can change the value of $L$ from the slider you've created, or even animate it by right-clicking->Animation On to change it's value automatically.

EDIT : For plotting the function only on the interval $[0;L]$, type : If[0 <= x <= L, 1 + x / L].