Simplfy Equation

I have been staring at this equation for a while, and I KNOW it can be simplified, but I can’t for the life of me get my brain around it today (too much Holiday I guess)

x=((xx-(lx*Z))/Z)-(dx/Z)

this equation works… but I’m sure there is a way to rearrange it to reduce the number of times Z is referenced

Are your variables x, l, Z and d? or x, xx, lx, Z and dx?

I usually don’t see xx but x^2, so I don’t know.

Could it be?:

x=((xx-dx)/Z)-lx

Note: added the missing ) after Z, but I think it is the same as:

x=(xx-dx)/Z-lx

xx is a variable

so x, xx , lx, z, and dx

Hi Dave,

Here is one way that seems to work - could you double-check it?

x = (xx-(1x*z)-dx)/z

I did the proof on my white board and made assumptions - lol…

[quote=366842:@Alberto De Poo]Are you variables x, l, Z and d? or x, xx, lx, Z and dx?

I usually don’t see xx but x^2, so I don’t know.

Could it be?:

x=((xx-dx)/Z)-lx

This does seem to work, and references each variable only once…

note …the original answer had a missing )

[quote=366845:@Dave S]
note …the original answer had a missing )[/quote]
Or maybe an extra ( :slight_smile:

Note: I edited my previous post

NumberEmpire.com has an expression simplifier that works with Xojo expressions. I find it very useful.

https://www.numberempire.com/simplifyexpression.php