I was trying to solve a set of equations in Wolfram|Alpha, but the solver is never able to parse the equations, what could it be?
(a1)*(x0)^2+(b1)*(x0)+c1=y0,
(a1)*(x1)^2+(b1)*(x1)+c1=y1,
(a2)*(x1)^2+(b2)*(x1)+(c2)=y1,
(a2)*(x2)^2+(b2)*(x2)+(c2)=y2,
2*(a1)*(x0)+b1=0,
2*(a2)*(x2)+b2=0,
2*(a2)*(x1)+b2=2*(a2*x1)+b2
for a1,a2,b1,b2,c1,c2,x1,x2
vaungureanu
(Valeriu Ungureanu)
July 11, 2016, 7:35pm
2
Did you mean these ones?
In[10]:= Solve[{a1 x0^2 + b1 x0 + c1 == y0,
a1 x1 ^2 + b1 x1 + c1 == y1, a2 x1^2 + b2 x1 + c2 == y1,
a2 x2^2 + b2 x2 + c2 == y2, 2 a1 x0 + b1 == 0, 2 a2 x2 + b2 == 0,
2 a2 x1 + b2 == 2 a2 x1 + b2}, {a1, a2, b1, b2, c1, c2, x0, y0,
x1, y1, x2, y2}]
During evaluation of In[10]:= Solve::svars: Equations may not give solutions for all "solve" variables. >>
Out[10]= {{b1 -> -2 a1 x0, b2 -> -2 a2 x2,
c2 -> c1 - 2 a1 x0 x1 + a1 x1^2 - a2 x1^2 + 2 a2 x1 x2,
y0 -> c1 - a1 x0^2, y1 -> c1 - 2 a1 x0 x1 + a1 x1^2,
y2 -> c1 - 2 a1 x0 x1 + a1 x1^2 - a2 x1^2 + 2 a2 x1 x2 - a2 x2^2}}
In[11]:= Reduce[{a1 x0^2 + b1 x0 + c1 == y0,
a1 x1 ^2 + b1 x1 + c1 == y1, a2 x1^2 + b2 x1 + c2 == y1,
a2 x2^2 + b2 x2 + c2 == y2, 2 a1 x0 + b1 == 0, 2 a2 x2 + b2 == 0,
2 a2 x1 + b2 == 2 a2 x1 + b2}, {a1, a2, b1, b2, c1, c2, x0, y0,
x1, y1, x2, y2}]
Out[11]= (a1 == 0 && a2 == 0 && b1 == 0 && b2 == 0 && c2 == c1 &&
y0 == c1 && y1 == c1 && y2 == c1) || (a1 == 0 && b1 == 0 &&
y0 == c1 &&
a2 != 0 && (x1 == (-b2 + Sqrt[b2^2 + 4 a2 c1 - 4 a2 c2])/(2 a2) ||
x1 == -((b2 + Sqrt[b2^2 + 4 a2 c1 - 4 a2 c2])/(2 a2))) &&
y1 == c1 && x2 == -(b2/(2 a2)) &&
y2 == 1/2 (2 c2 + b2 x2)) || (a2 == 0 && b2 == 0 && a1 != 0 &&
x0 == -(b1/(2 a1)) &&
y0 == 1/2 (2 c1 + b1 x0) && (x1 == (-b1 - Sqrt[
b1^2 - 4 a1 c1 + 4 a1 c2])/(2 a1) ||
x1 == (-b1 + Sqrt[b1^2 - 4 a1 c1 + 4 a1 c2])/(2 a1)) &&
y1 == c2 && y2 == c2) || (a2 == a1 && b2 == b1 && c2 == c1 &&
a1 != 0 && x0 == -(b1/(2 a1)) && y0 == 1/2 (2 c1 + b1 x0) &&
y1 == c1 + b1 x1 + a1 x1^2 && x2 == x0 &&
y2 == 1/2 (2 c1 + b1 x0)) || (a2 == a1 && a1 != 0 &&
x0 == -(b1/(2 a1)) && y0 == 1/2 (2 c1 + b1 x0) && b1 - b2 != 0 &&
x1 == (-c1 + c2)/(b1 - b2) && y1 == c1 + b1 x1 + a1 x1^2 &&
x2 == -(b2/(2 a1)) && y2 == 1/2 (2 c2 + b2 x2)) || (a1 != 0 &&
x0 == -(b1/(2 a1)) && y0 == 1/2 (2 c1 + b1 x0) &&
a1 - a2 !=
0 && (x1 == (-b1 + b2 -
Sqrt[(b1 - b2)^2 - 4 (a1 - a2) (c1 - c2)])/(2 (a1 - a2)) ||
x1 == (-b1 + b2 + Sqrt[(b1 - b2)^2 - 4 (a1 - a2) (c1 - c2)])/(
2 (a1 - a2))) && y1 == c1 + b1 x1 + a1 x1^2 && a2 != 0 &&
x2 == -(b2/(2 a2)) && y2 == 1/2 (2 c2 + b2 x2))
Thanks for the answer. I have a couple of follow-ups -
Is your format the right format for using the wolfram alpha calculator?
Do you know why it couldnt solve for a1 b1 .. etc?
vaungureanu
(Valeriu Ungureanu)
July 11, 2016, 8:20pm
4
I solved your system in Mathematica. But I can suggest some errors in your system. First of all, you didn’t specify all variables. Second, you wrote (a2x1) that may be interpreted as a variable, not a product, i.e. you must write it as (a2 x1).
Thanks for trying it out in Mathematica. The a2x1 typo could have definitely messed it. But I do want the equations to be solved for a1,a2,b1,b2,c1,c2,x1,x2 and not the other remaining variables (or just a1 a2 b1 b2 c1 c2).
Also, even with the typo corrected, wolfram alpha still doesn’t understand my query..