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: {}
Asked
Active
Viewed 123 times
0
Karsten7
- 27,448
- 5
- 73
- 134
JayTheEnthusiast
- 3
- 1
1 Answers
1
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.
Syed
- 52,495
- 4
- 30
- 85
-
It works, thanks for the help and your advice. I'll take a look at it. – JayTheEnthusiast Sep 07 '21 at 12:11
Solve[{R == -(a*b^2)/(c*(a - b)), R == -3, a == 2, b == -6}]– Coolwater Sep 07 '21 at 09:29Solve[{R == -(a*b^2)/(c*(a - b)), R == -3, a == 2, b == -6}, c, {R, a, b}]orSolve[{R == -(a*b^2)/(c*(a - b)), R == -3, a == 2, b == -6}, c, MaxExtraConditions -> All] // Normal– Bob Hanlon Sep 07 '21 at 12:56{}means there is no solution forcsuch that your equations will beTruefor all values of the remaining variablesR, a, b. If that was the caseSolvecould return a solution with a variable left out, e.g.Solve[a == 2 && b(a-2) == 0, a]– Coolwater Sep 07 '21 at 13:46