[newbie] trouble plotting function



I'm trying to plot the function in the code below for 0.1=<tau12=<5
I get however an error message:
  plotting: range must be of the form 
[variable, min, max]; found: [tau[12],0.1,5]

p:tau[11]*tau[22];
sigma:tau[11]+tau[12]+tau[22];
A:sqrt(p^2+2*p*sigma)-p;
hjmax(p,sigma,A):=sqrt((1+A/p)/((1-A/sigma^2)^2+A/p));
subst([A=sqrt(p^2+2*p*sigma)-p,sigma=tau[11]+tau[12]+tau[22],p=tau[11]*tau[22],tau[11]=1,tau[22]=1],hjmax(A,sigma,p));
eq:diff(%,tau[12]);
plot2d(%,[tau[12],0.1,5]);

How do I correct the plot-statement?

thanks in advance
hugo