# Solving a system of equations with specific range of coefficients

I have define the following functions:

w[k_] := k*0.8 + (1 - k)*0.3

b[k_] := 0.3*Sqrt[k]


and I want to solve the following system of equations

optimal = {0.5*x^(-1/2) == w[k]/(p + sP), D[b[k], k]/D[w[k], k] == x*(1 - r)/r}

by calling the Solve function

Solve[optimal, {x, k}, PositiveReals]

However, $$p>0$$, $$sP>0$$ and $$r\in[0,1]$$. So, my question is how to tell mathematica to account for these constraints on the value of coefficients?

• It does not answer your question but if your are using Solve, I would suggest adding \\ Rationalize after the definition of optimal. – anderstood Oct 28 at 14:47
• Also, the condition can be simplified. If $p$ and $sP$ are positive, since $x^(-1/2)>0$, w[k] has to be positive too, Reduce[w[k] > 0 // Rationalize] returns k > -(3/5). – anderstood Oct 28 at 14:51
• w[k] is always positive, since $k\in[0,1]$ – Yorgos Oct 28 at 14:54
• w[k_] = k*0.8 + (1 - k) 0.3 // Rationalize; b[k_] = Rationalize@0.3*Sqrt[k] // Rationalize; optimal = {0.5*x^(-1/2) == w[k]/(p + sP), D[b[k], k]/D[w[k], k] == x*(1 - r)/r, x > 0, k > 0, p > 0, sp > 0, 0 < r < 1} // Rationalize; Reduce[optimal, {x, k}, Reals] – cvgmt Oct 28 at 15:10