# Reducing or solving a simple linear equation problem

I have the following equations

Subscript[NE, t] == Subscript[X, t]/(γ*σ^2)

Subscript[NF, t] == (Subscript[D, t] - (T - t - 1)*γ*σ^2*Q - Subscript[P,t])/(γ*σ^2)

uf == 1 - ue

Q == ue*Subscript[NE, t] + uf*Subscript[NF, t]


I would like to solve for Subscript[P,t]

When I use the Reduce function I get the following output:

ue + uf == 1 &&
Q == ue Subscript[NE, t] +
uf Subscript[NF,
t] && ((γ σ != 0 && Subscript[NE, t] == 0 &&
Subscript[X, t] ==
0) || (σ Subscript[NE, t] Subscript[X, t] !=
0 && γ == Subscript[X,
t]/(σ^2 Subscript[NE, t]))) &&
Subscript[P, t] ==
Subscript[D,
t] + γ σ^2 (Q (1 + t - T) - Subscript[NF, t])


Which is not the correct solution.

When I try using the Solve function I get an empty output. What am I doing wrong? Are Reduce and Solve not correct to use here?

• I dont have time to give a full answer, but please rewrite all of your code variables that have a subscript with just Pt or Dt and etc...and your code will likley work, unfortunatel subscript is kinda a trap for new users...also ‘D’ id a protected letter and means D[] and will cause failures when using as a variable alone...same as “I” if you dont intend to work with complex values! Good luck. – morbo Jun 18 at 20:20

You can use Solve with a 3rd argument specifying which variables to eliminate:

Solve[
{
Subscript[NE,t]==Subscript[X,t]/(γ*σ^2),
Subscript[NF,t]==(Subscript[D,t]-(T-t-1)*γ*σ^2*Q-Subscript[P,t])/(γ*σ^2),
uf==1-ue,
Q==ue*Subscript[NE,t]+uf*Subscript[NF,t]
},
Subscript[P, t],
{uf, Q, Subscript[NE, t]}
]


{{Subscript[P, t] -> -γ σ^2 (-(Subscript[D, t]/(γ σ^2)) + Subscript[NF, t] - (-1 - t + T) ((-1 + ue) Subscript[NF, t] - ( ue Subscript[X, t])/(γ σ^2)))}}

If you eliminate ue, Subscript[NE,t] and Subscript[NF,t], then after a simple replacement you will arrive at the solution from your paper:

Solve[
{
Subscript[NE,t]==Subscript[X,t]/(γ*σ^2),
Subscript[NF,t]==(Subscript[D,t]-(T-t-1)*γ*σ^2*Q-Subscript[P,t])/(γ*σ^2),
uf==1-ue,
Q==ue*Subscript[NE,t]+uf*Subscript[NF,t]
},
Subscript[P, t],
{ue, Subscript[NF, t], Subscript[NE, t]}
] /. Subscript[X, t] - uf Subscript[X, t] -> ue Subscript[X, t]


{{Subscript[P, t] -> (-Q γ σ^2 + Q uf γ σ^2 + Q t uf γ σ^2 - Q T uf γ σ^2 + uf Subscript[D, t] + ue Subscript[X, t])/uf}}

• thank you! Any idea why I cant eliminate Subscript[NF, t] and Subscript[NE, t]? – Jj Blevins Jun 18 at 20:30
• @JjBlevins You have 4 equations, so you need to eliminate 3 variables. Which variable were you trying to eliminate in addition to Subscript[NF,t] and Subscript[NE,t]? – Carl Woll Jun 18 at 20:40
• Q was the third. – Jj Blevins Jun 18 at 20:44
• @JjBlevins If you use Eliminate[eqns, {Subscript[NE,1], Subscript[NF,1], Q}] you will see that both Q and Subscript[P, t] have also been eliminated. – Carl Woll Jun 18 at 20:46
• According to the paper I got this problem from the right solution should be: Subscript[P, t] = Subscript[D, t] + (ue/uf)*Subscript[X, t] - \[Gamma]*\[Sigma]^2*Q*(T - t - 1 + 1/(uf)) – Jj Blevins Jun 18 at 20:50