Ask Your Question
0

Substitution

asked 2020-05-18 08:10:50 -0600

Cyrille gravatar image

updated 2020-05-18 12:07:20 -0600

tmonteil gravatar image

After some calculation I arrive to the following equation $\frac{Dp - D+ I}{D(P-1)}$.

Whichever be the command I use I cannot put it as $\frac{D(p - 1)+ I}{D(P-1)}$ or as $1-\frac{I}{D*(P-1)}$ or $1-\frac{I}{D}\frac{1}{(P-1)}$.

This last equation is the one of interest since I would like to solve $1-\frac{I}{D}\frac{1}{(P-1)}==0$ according to $\frac{D}{I}$.

Is there a way to use solve() acording to $\frac{D}{I}$ ? I have tried to substitue x with a form of substitute()for it, but it was an echec. I understand that substitue a ratio of 2 variables for one is a little bit complex.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-05-18 12:09:30 -0600

tmonteil gravatar image

updated 2020-05-18 12:10:27 -0600

You can add a new variable to model D/I and solve a system of equations :

sage: var('D,P,I,z')
sage: e = (D*P - D + I)/(D*(P - 1))
sage: e
(D*p - D + I)/(D*(P - 1))
sage: solve([e == 0, z == D/I], z, D)
[[z == -1/(P - 1), D == -I/(P - 1)]]
edit flag offensive delete link more

Comments

Thank tmonteil. When I read your solution I feel stupid. This is so simple.

Cyrille gravatar imageCyrille ( 2020-05-18 12:24:11 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-18 08:10:50 -0600

Seen: 102 times

Last updated: May 18