# Question:How to select four points from a list so that this points lie on the graph of the funtion y = (ax+b)/(cx+d)?

October 06 2013

0

I have a list contains the triagles with in each triangle has mesure of the angle AOB equal to 45 degrees. Now I want to select four points in list so that they lie on the graph of the funtion y = (ax + b)/(cx + d), where c <> 0. This is the code which I make the list.

> restart:

ListTools[Categorize]:

N:=10:

L:=[]:

for x1 from -5 to N do

for y1 from -5 to N do

for x2 from -5 to N do

for y2 from -5 to N do

a:=x1^2+y1^2:

b:=x2^2+y2^2:

c:=a+b-2*sqrt(a*b)*cos(Pi/4):

if type(a, positive) and type(b, positive) and   c=(x2-x1)^2 + (y2-y1)^2 and x1*(x2-x1)+y1*(y2-y1)<>0 and x2*(x2-x1)+y2*(y2-y1)<>0 then L:=[op(L), [[0, 0], [x1, y1], [x2, y2]]]: fi:

od: od: od: od:

nops(L);

L;

I select by hand and I tried

> f:=x->(a*x + b)/(c*x + d);

solve([f(3)=1,f(4)=8,f(8)=-4,f(10)=-5],[a,b,c,d]);

But I got a = 0, b = 0, c = 0, d = 0.  How to tell Maple to do that?

﻿