How can I solve for x in the equation z = y/x * 1/(x-y)?

  • Thread starter Thread starter onequestion321
  • Start date Start date
AI Thread Summary
The equation z = y/x * 1/(x-y) is used to calculate the average wait time in a mono-server queue system. The goal is to solve for x, which represents the service rate needed to achieve a desired average wait time (z) given an arrival rate (y). The user has derived the equation x(x-y) = y/z but is struggling with the (x-y) term. A suggested approach is to expand the equation to form a quadratic equation, x^2 - xy - y/z = 0, and then apply the quadratic formula to find x in terms of y and z. This method provides a pathway to determine the ideal number of servers based on the calculated service rate.
onequestion321
Messages
2
Reaction score
0

Homework Statement


Not a homework problem. I'm trying to solve an equation that will help me with some code I'm writing but I'm stuck. I haven't done much math in a while and I'm not sure if I'm missing something or if solving for x here is even possible, though the equation works so... it should be right?


Homework Equations


The title actually contains the result of one of my solution attempts. The original equation is:

z = y/x * 1/(x-y)

This is actually the equation to find the average wait time in a queue in a mono-server system.
I'm hoping to get an equation I can use to determine the ideal number of servers to use given a desired average wait time (z) and the arrival rate (y). x here should equal the service rate needed to attain the desired average wait time. I know that solving for x with those two numbers won't directly give the number of servers needed but I THINK I'll be able to calculate that using the actual service rate and the value of x.


The Attempt at a Solution


As you can see from the title I got to:

x(x-y) = y/z

And here I'm stuck because I can't figure out what to do about (x-y). Every solution I've attempted has been vexed by an inability to get that subtraction out of the equation. If there's some algebraic trick I'm not aware of I'd love to pointed in the right direction.

Homework Statement



PS. There's a bug in your preview viewer that causes the template to be appended to the text.
 
Physics news on Phys.org
onequestion321 said:

Homework Statement


Not a homework problem. I'm trying to solve an equation that will help me with some code I'm writing but I'm stuck. I haven't done much math in a while and I'm not sure if I'm missing something or if solving for x here is even possible, though the equation works so... it should be right?


Homework Equations


The title actually contains the result of one of my solution attempts. The original equation is:

z = y/x * 1/(x-y)

This is actually the equation to find the average wait time in a queue in a mono-server system.
I'm hoping to get an equation I can use to determine the ideal number of servers to use given a desired average wait time (z) and the arrival rate (y). x here should equal the service rate needed to attain the desired average wait time. I know that solving for x with those two numbers won't directly give the number of servers needed but I THINK I'll be able to calculate that using the actual service rate and the value of x.


The Attempt at a Solution


As you can see from the title I got to:

x(x-y) = y/z

And here I'm stuck because I can't figure out what to do about (x-y). Every solution I've attempted has been vexed by an inability to get that subtraction out of the equation. If there's some algebraic trick I'm not aware of I'd love to pointed in the right direction.

Homework Statement



PS. There's a bug in your preview viewer that causes the template to be appended to the text.

Expand the left side of your equation and bring the y/z term over to get
x2 - xy - y/z = 0

This is a quadratic equation in x. Use the quadratic formula to solve for x in terms of y and z.

The bug you mentioned has been known for quite a while. I don't know if the owner of the site has attempted to fix it.
 
Its working very well, thank you.
 
Back
Top