Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

February 21st, 2013, 03:24 PM
 wimmpieb
n00b DevH'er

Join Date: Feb 2013
Posts: 3
Time spent in forums: 15 m 30 sec
Reputation Power: 0
Intersection within PRGM

Hello guys,

I'm writing a simple program for my TI84 Plus, but i have to figure out how i can calculate and use intersections inside PRGM without accessing the graph screen every time .
The idea behind this is that a (random) person can just type in 2 variables, the program implements these into a formula, and calculates the intersections with a line, these intersections should be multiplied by an other variable and then displayed.

Wimmpieb

February 21st, 2013, 10:21 PM
 Weregoose
Contributing User

Join Date: Dec 2011
Posts: 40
Time spent in forums: 16 h 2 m 21 sec
Reputation Power: 3
Assuming slope-intercept form (y=mx+b), the y-intercept is b and the x-intercept is -b/m.

Reading through again, I see you mean the crossing of one arbitrary line with another; the x-value of this special point is gotten by taking the parts of each equation not containing y, setting them equal to each other, then solving.

y=s*x+t and y=u*x+v

s*x+t=u*x+v

x=(v-t)/(s-u)

The y-value is found by plugging this x into either part and simplifying.

y=s*(v-t)/(s-u)+t or y=u*(v-t)/(s-u)+v

y=(s*v-t*u)/(s-u)

February 22nd, 2013, 02:10 AM
 wimmpieb
n00b DevH'er

Join Date: Feb 2013
Posts: 3
Time spent in forums: 15 m 30 sec
Reputation Power: 0
Thanks but it isn't about y=ax+b, one of the actual formulas is (x^2)/(B-x) = (for example) C
Is this possible?

February 22nd, 2013, 02:41 AM
 Weregoose
Contributing User

Join Date: Dec 2011
Posts: 40
Time spent in forums: 16 h 2 m 21 sec
Reputation Power: 3
Quote:
 Originally Posted by wimmpieb Thanks but it isn't about y=ax+b, one of the actual formulas is (x^2)/(B-x) = (for example) C Is this possible?
Then I'll need more information about how general the routine will have to be. How consistent are these formulas? The principle of setting both equations to each other and solving for the intersection's x still holds.

February 22nd, 2013, 04:50 AM
 wimmpieb
n00b DevH'er

Join Date: Feb 2013
Posts: 3
Time spent in forums: 15 m 30 sec
Reputation Power: 0
Quote:
 Originally Posted by Weregoose Then I'll need more information about how general the routine will have to be. How consistent are these formulas? The principle of setting both equations to each other and solving for the intersection's x still holds.

There are three types I have to implement in the program.
The first one: (x^2)/(B-X) = C
In this case B and C are known and the program should calculate X.

The second one: (x^2)/(B-X) = C
In this case X and C are known and the program should calculate B.

The last one: (x^2)/(B-X) = C
In this case X and B are known and the program should calculate C.
This one is ofcourse easy, the upper two are the most important.

It only uses the formula I gave to you, so it is very consistent. I tried writing the formula in an other form to get the X Or the B in front but I couldn't get it.

Wimmpieb

February 22nd, 2013, 07:18 AM
 Weregoose
Contributing User

Join Date: Dec 2011
Posts: 40
Time spent in forums: 16 h 2 m 21 sec
Reputation Power: 3
Quote:
 Originally Posted by wimmpieb There are three types I have to implement in the program. The first one: (x^2)/(B-X) = C In this case B and C are known and the program should calculate X. The second one: (x^2)/(B-X) = C In this case X and C are known and the program should calculate B. The last one: (x^2)/(B-X) = C In this case X and B are known and the program should calculate C. This one is ofcourse easy, the upper two are the most important. It only uses the formula I gave to you, so it is very consistent. I tried writing the formula in an other form to get the X Or the B in front but I couldn't get it. Wimmpieb
x²/(B-X) = C
x² = C(B-X)
x²/C = B-X
B-x²/C = X and x²/C+X = B

 Viewing: Dev Hardware Forums > SOFTWARE > TI 83/84 > Intersection within PRGM