# No solution to the equation even though it has one

I was trying out Mathematica with a simple equation. I tried this one out, but it outputted nothing and when I went on WolframAlpha to test it, there was a result (c = 3 btw). Please let me know if there is something wrong with my input. I also entered the exact same code into WolframAlpha. Much thanks!
Input: Solve[{R == -(a*b^2)/(c*(a - b)), R == -3, a == 2, b == -6}, c]
Output: {}

• See mathematica.stackexchange.com/questions/17127, also try Solve[{R == -(a*b^2)/(c*(a - b)), R == -3, a == 2, b == -6}] Sep 7, 2021 at 9:29
• Yup, that works! Thanks a lot. Btw, why is it able to solve when I don't put the unknown variable? May I know the reason or how it works. Sep 7, 2021 at 12:10
• Or Solve[{R == -(a*b^2)/(c*(a - b)), R == -3, a == 2, b == -6}, c, {R, a, b}] or Solve[{R == -(a*b^2)/(c*(a - b)), R == -3, a == 2, b == -6}, c, MaxExtraConditions -> All] // Normal Sep 7, 2021 at 12:56
• @JayTheEnthusiast The output {} means there is no solution for c such that your equations will be True for all values of the remaining variables R, a, b. If that was the case Solve could return a solution with a variable left out, e.g. Solve[a == 2 && b(a-2) == 0, a] Sep 7, 2021 at 13:46

ClearAll[R, a, b, c]


Solve the equation in terms of c

Solve[R == -(a b^2)/(c (a - b)), c]

{{c -> -((a b^2)/((a - b) R))}}


These are called replacement rules. Apply more rules using /.

{{c -> -((a b^2)/((a - b) R))}} /. {R -> -3, a -> 2, b -> -6}

{{c -> 3}}


To get started with Mma:

https://www.wolfram.com/language/elementary-introduction/2nd-ed/index.html

The syntax for Mathematica is not the same as Wolfram Alpha but it is similar. In fact, if you try these commands out over at WA, these will still work. The reverse however, is not true in general.

• It works, thanks for the help and your advice. I'll take a look at it. Sep 7, 2021 at 12:11