1
$\begingroup$

I am trying to solve this equation for $R$ and $R_Y$. The equation seems symmetrical in terms of $R$ and $R_Y$. I don't understand why it solves fine for $R_Y$, but can't for $R$. If I replace $R_Y$ with $P$, then everything works just fine. I guess something is because of subscript use. $$ \frac{V_1 S R}{K_1 + R} - \frac{V_2 R_Y}{K_2 + R_Y} = 0$$

Solving for $R$.

Solve[(Subscript[V, 1] S R)/(Subscript[K, 1] + R) - (
Subscript[V, 2] Subscript[R, Y])/(
Subscript[K, 2] + Subscript[R, Y]) == 0, R]

Returns the expression itself. I guess if fails to solve for $R$.

Solve[(R S Subscript[V, 1])/(R + Subscript[K, 1]) - ( Subscript[R, Y] Subscript[V, 2])/( Subscript[K, 2] + Subscript[R, Y]) == 0, R]

Solving for $R_Y$

Solve[(R S Subscript[V, 1])/(R + Subscript[K, 1]) - (
Subscript[R, Y] Subscript[V, 2])/(
Subscript[K, 2] + Subscript[R, Y]) == 0, Subscript[R, Y]]

Solve for $R_Y$ just fine.

{{Subscript[R, Y] -> -((R S Subscript[K, 2] Subscript[V, 1])/( R S Subscript[V, 1] - R Subscript[V, 2] - Subscript[K, 1] Subscript[V, 2]))}}

$\endgroup$
  • 2
    $\begingroup$ The problem is that Mathematica thinks that Subscript[R,Y] is an unknown function of R. Thus it can't solve the equations for R. You can see this same behavior if you replace Subscript with an arbitrary function f. Easiest solution is not to use subscripts, and instead just use things like RY and V1. $\endgroup$ – Erich Mueller Apr 5 '17 at 23:43
2
$\begingroup$

You can use Format to avoid subscripts and the associated problems.

Format[R[x_: ""]] := Subscript[R, x]
Format[V[n_Integer]] := Subscript[V, n]
Format[K[n_Integer]] := Subscript[K, n]

eqn = (V[1]*S*R[])/(K[1] + R[]) - (V[2]*R[y])/(K[2] + R[y]) == 0

enter image description here

soln1 = Solve[eqn, R[]][[1]]

enter image description here

soln2 = Solve[eqn, R[y]][[1]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.