Ask Your Question
0

Substitution

asked 2020-05-18 15:10:50 +0100

Cyrille gravatar image

updated 2020-05-18 19:07:20 +0100

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 19:09:30 +0100

tmonteil gravatar image

updated 2020-05-18 19:10:27 +0100

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 19:24:11 +0100 )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 15:10:50 +0100

Seen: 624 times

Last updated: May 18 '20