# Bounding Solve results to named variables

How can i bound results of my Solve function to variables properly? This metod works but causes unexpected troubles i struggle to resolve

q1 = {tk - T/2, w};
q2 = {tk, ak};
q3 = {tk + T/2, w};
Solve[p == 0, t]; Solve[a1*q1[]^2 + a2*q1[] + a3 == q1[] &&
a1*q2[]^2 + a2*q2[] + a3 == q2[] &&
a1*q3[]^2 + a2*q3[] + a3 == q3[], {a1, a2, a3}];
% /. Rule -> Set;

• First off, it's best not to use % unless you're doing fast prototyping. It's apt to give you headaches. Second, you can just use {a1, a2, a3} = {a1, a2, a3} /. soln but I'd keep it as rules, myself. – b3m2a1 May 27 at 17:58
• Check this carefully to see it works. {{a1,a2,a3}}=ReplaceAll[{a1,a2,a3}, Solve[a1*q1[]^2 + a2*q1[] + a3 == q1[] && a1*q2[]^2 + a2*q2[] + a3 == q2[] && a1*q3[]^2 + a2*q3[] + a3 == q3[], {a1,a2,a3}]] and then look at the value assigned to a1 or the value assigned to a2... As you have seen, you can use /. as an abbreviation for ReplaceAll. Look carefully at how many layers of {{}} there are in the result returned from Solve and make certain those match the number in any assignment. – Bill May 27 at 18:05