Plotting a part of curves (with possible solution as an attempt) I may mess up with this question!
I plotted them using http://www.desmos.com/calculator

How to plot only a part of some curves?

For example:
Plot of $y=x^2$:


But if i want to plot the curve from $x=1$ to $x=2$ which will look something like:

How to achieve it?


My attempt:
I can only do $[n,\infty)$, that is starting from $x=n$ but ending up in $\infty$. [first limitation]
Lets take a function say $f(x)=x$...
So suppose if i want to plot it from $x=3$...what i do is plot
$y=({\sqrt{x-3}})^2 + 3$
thus giving me :

But it also does not work on even degree equation like $y=x^2$ which gives: [second limitation]
($y=({\sqrt{x^2-3}})^2 + 3$ )

And also does not work with curves like $\sin{x}$ as using $y=({\sqrt{f(x)-n}})^2 + n$ (as i have been using) makes the values non-real if $n\geq 1$. [third limitation]

My 2nd attempt:

I plotted $y=x^2+0{\sqrt{x-1}}^2+0{\sqrt{3-x}}^2$ to get :


which is exactly what i want but i guess the method is a little crude.

Hence final method : $y=f(x)+0{\sqrt{x-a}}^2+0{\sqrt{b-x}}^2$ ... am i right?


Rory's suggestion is quite good, and it should work for Desmos. But apparently what you want is to stealthily include domain information; that's what it will boil down to, as we'll see.
To this end, you can cook up auxiliary "characteristic functions" that are $1$ at least on the domain you want, and $0$ certain places where you don't want to plot the function.
Thus, we'll let $$\ell_b(x) = \frac{1}{2(x - b)}\bigg(x - b - \lvert x - b\rvert\bigg) = \begin{cases}1, &x < b\\0, &x > b\end{cases}$$
so that $\ell_a(x)$ encodes whether $x \in (-\infty, a)$; that is, whether $x$ is to the $\ell$eft of $a$. Note that $\ell_a(a)$ is not defined (and I don't particularly care to find a way to make it either $1$ or $0$) at $x = b$.
Now, given any function $f(x)$, if you plot $\dfrac{f(x)}{\ell_b(x)}$, you'll get the graph of $f$ only for $x < b$.
You can do something analogous to define a characteristic function for the right-opening ray $(a, \infty)$, defining 
$$r_a(x) = \frac{1}{2(a - x)}\bigg(a - x - \lvert a - x \rvert\bigg) = \begin{cases}0, &x < a\\1, &x > a\end{cases},$$
again noting that $r_b(x)$ is not defined for $x = a$.
Now, if you want to plot the function $f(x)$ for $a < x < b$, this is exactly
$$\frac{f(x)}{2}\bigg(\frac{1}{\ell_b(x)}+\frac{1}{r_a(x)}\bigg),$$
provided $a < b$.
So, it's really just sneakily including domain information, but if it's what you want to do, you can. Things are trickier to define a function on a union of intervals like $(-\infty, a) \cup (b, \infty)$, so I'll let you think about that, if you want. The key is just to figure out a way to divide by $0$ outside of your desired domain, and divide by $1$ on the desired domain (while rescaling, if you need to use a sum).
