is there an online tool for solving equation of a line?

107 Views Asked by At

I have as input two points. But the input points contain variables (constant references).

I've seen some tools online but they require numeric values.

The two given points are specified by constant expressions. You can assume: P1=(expr1, expr2 ), P2=(expr3, expr4) where exprn is some sum or product combination of constants a, b and c or a numeric. For example expr1 can be a+b, expr2 can be 2b and so on.

The problem can definitely be solved by hand, and its not a particularly difficult problem but my question is whether it can be automatically solved an online tool.

For example, if I give 2 points: (a,0) and (b,c)

I'd like to get the a simplified answer like:

$$c x + (a-b)y - a c = 0$$

3

There are 3 best solutions below

0
On BEST ANSWER

You can simply ask Wolfram Alpha something like:

line through (a+2b,3a) and (2a-b,3a+4b)

and it will provide you with the answer

$$y = (3 a^2-13 a b-8 b^2)/(a-3 b)+(4 b x)/(a-3 b)$$

as well as tell you that:

x-intercept: $ -\frac{3 a (a-3 b)}{4 b} +a+2 b $

y-intercept: $\frac{3 a^2-13 a b-8 b^2}{a-3 b}$

slope: $\frac{4 b}{a-3 b}$

7
On

Wolfram Alpha will do many kinds of symbolic computation.

5
On

As others have noted, it's hard to answer this question without more details. However, if $P_1=(expr1,expr2)$ and $P_2=(expr3,expr4)$, then the slope of the line joining the two points is given by $$m=\frac{expr4-expr2}{expr3-expr1}$$ and the line through the two points can be written in the form $$y = \frac{expr4-expr2}{expr3-expr1}(x-expr1) + expr2$$

I suppose you can feed that into Wolfram Alpha if you like and it can simplify the result for you.