# Newbie question: how to solve for a given var in this set of equations

Posted 9 years ago
6380 Views
|
|
0 Total Likes
|
 I have entered the following equations into Wolfram and it seems to understand them. I'd like to solve for t in terms of the other scalars:  A={ax,ay}; B={bx,by}; C={cx,cy}; B'=(A+C)/2+t*(B-(A+C)/2); d=(A-B').(C-B')/(Norm[A-B']*Norm[C-B'] )I've tried variations on the Solve[] command but I am not sure how to express this. I'm also curious as to why Wolfram always says that variable C is protected in the above.thanks, Pat
 Try this In:= Avector = {ax, ay}; Bvector = {bx, by}; Cvector = {cx, cy}; Bvectorprime = (Avector + Cvector)/2 + t*(Bvector - (Avector + Cvector)/2); d = (Avector - Bvectorprime).(Cvector - Bvectorprime)/(Norm[ Avector - Bvectorprime]*Norm[Cvector - Bvectorprime]); Solve[d == 0, t] Out= { {t -> -(Sqrt[ax^2 + ay^2 - 2 ax cx + cx^2 - 2 ay cy + cy^2])/(Sqrt[ax^2 + ay^2 - 4 ax bx + 4 bx^2 - 4 ay by + 4 by^2 + 2 ax cx - 4 bx cx + cx^2 + 2 ay cy - 4 by cy + cy^2])}, {t -> (Sqrt[ax^2 + ay^2 - 2 ax cx + cx^2 - 2 ay cy + cy^2])/(Sqrt[ax^2 + ay^2 - 4 ax bx + 4 bx^2 - 4 ay by + 4 by^2 + 2 ax cx - 4 bx cx + cx^2 + 2 ay cy - 4 by cy + cy^2])}} Many symbols are have predefined meaning within Mathematica. For example C and ' <-Click each of those to read the documentation.