# Eliminate keeps the variable

I have the following equations:

x == 10*Sin[i/10] + j + 0.008*j*j - 30
y == h/2 + j/2*Sin[j/50 - t/50 - i/118] + (i*0.9)*Cos[j/25 - (i + t)/65]


i, h, and t are constant factors.

I'm trying to get y in terms of x and no j in the resulting equation.

Eliminate[{%1, %2}, j]


Gives me a huge set of equations that still has j in them.

What am I doing wrong?

• looks strange. Maybe it started with the second equation to solve for j instead of the first one? Manually, you can do it as follows eq1 = x == 10*Sin[i/10] + j + 8/1000*j*j - 30; eq2 = y == h/2 + j/2*Sin[j/50 - t/50 - i/118] + (i*9/10)* Cos[j/25 - (i + t)/65]; solJ = Solve[eq1, j]; eq2 /. solJ which eliminates j. Screen shot !Mathematica graphics Feb 6 at 11:07
• You didn't say that you get the warning : "Eliminate::ifun ". The documentations does say "Eliminate works primarily with linear and polynomial equations." not the case here, however, we all have experience using eliminate with non-polynomial expressions. Feb 6 at 11:12
• That is good point by rhermans, it explains why it did not do it. It must have started by the second equation which is non-linear. Eliminate is not supposed to be used with non-linear equations. Feb 6 at 11:33
• Right, sorry I missed that. I'm very new to Mathematica. I didn't quite understand the warning. Feb 6 at 12:23
• @PointlessOne it's OK to not understand things, but it's also important to share ALL you have observed so we can pick up the problem with all the information available. Next time share minimal account of your diligence, test and observations. Feb 6 at 12:45

# Limited scope of Eliminate

The only thing you are doing wrong is to have expectations beyond the capability of Eliminate.

You get the warning

Eliminate::ifun: Inverse functions are being used by Eliminate, so some solutions may not be found; use Reduce for complete solution information.

Eliminate works primarily with linear and polynomial equations. Sometimes Eliminate will work with complicated expressions, but it's only supposed to work with polynomial equations. Other tools like Solve and Reduce sometimes will not find solutions either.

# Workaround.

Borrowing from @Nasser in the comments, you can solve for j on one equation and replace on the other. Notice there are two solutions, so I Apply (@@) Or to keep this as a single logical expression.

Reduce[
Or@@ReplaceAll[
y ==  h/2 + j/2*Sin[j/50 - t/50 - i/118] + (i*9/10)* Cos[j/25 - (i + t)/65]
, Echo[Solve[ x == 10*Sin[i/10] + j + 8/1000*j*j - 30, j], "Solutions:", Length]
]
,{x,y}
] 