# numerical integration – How can I isolate a specific variable to one side in an equation?

Firstly, I will integrate the equation using Simpson’s 3/8 Rule since it is quite long to do analytically. All the variables
(x, y, r, n, ps, k) are unknowns. I want to make r as the subject.
I tried exploring Collect(UMCAP,r) however it does not collect r but just giving the same answer. Is there any way how to ask Wolfram Alpha to “Collect r” (not solve) equation. I just want it to collect r for simplicity because after that I need to integrate the variable r and substitute into other equation. Thank you.

UMCAP=the long expressions

Here is the example:

``````Collect (ps^n (-(1/(24 ps))
n (-k + r) y (((-k^2 + x (x + y/ps))/k)^(-1 +
n) + ((-r^2 + x (x + y/ps))/r)^(-1 + n) +
3 ((-(k + 1/9 (-k + r))^2 + x (x + y/ps))/(
k + 1/9 (-k + r)))^(-1 + n) +
3 ((-(k + 2/9 (-k + r))^2 + x (x + y/ps))/(
k + 2/9 (-k + r)))^(-1 + n) +
2 ((-(k + 1/3 (-k + r))^2 + x (x + y/ps))/(
k + 1/3 (-k + r)))^(-1 + n) +
3 ((-(k + 4/9 (-k + r))^2 + x (x + y/ps))/(
k + 4/9 (-k + r)))^(-1 + n) +
3 ((-(k + 5/9 (-k + r))^2 + x (x + y/ps))/(
k + 5/9 (-k + r)))^(-1 + n) +
2 ((-(k + 2/3 (-k + r))^2 + x (x + y/ps))/(
k + 2/3 (-k + r)))^(-1 + n) +
3 ((-(k + 7/9 (-k + r))^2 + x (x + y/ps))/(
k + 7/9 (-k + r)))^(-1 + n) +
3 ((-(k + 8/9 (-k + r))^2 + x (x + y/ps))/(
k + 8/9 (-k + r)))^(-1 + n)) +
1/24 (-k + r) (((-k^2 + x (x + y/ps))/k)^
n + ((-r^2 + x (x + y/ps))/r)^n +
3 ((-(k + 1/9 (-k + r))^2 + x (x + y/ps))/(k + 1/9 (-k + r)))^
n + 3 ((-(k + 2/9 (-k + r))^2 + x (x + y/ps))/(
k + 2/9 (-k + r)))^n +
2 ((-(k + 1/3 (-k + r))^2 + x (x + y/ps))/(k + 1/3 (-k + r)))^n
+ 3 ((-(k + 4/9 (-k + r))^2 + x (x + y/ps))/(k + 4/9 (-k + r)))^
n + 3 ((-(k + 5/9 (-k + r))^2 + x (x + y/ps))/(
k + 5/9 (-k + r)))^n +
2 ((-(k + 2/3 (-k + r))^2 + x (x + y/ps))/(k + 2/3 (-k + r)))^
n + 3 ((-(k + 7/9 (-k + r))^2 + x (x + y/ps))/(
k + 7/9 (-k + r)))^n +
3 ((-(k + 8/9 (-k + r))^2 + x (x + y/ps))/(k + 8/9 (-k + r)))^
n)),r)
``````

after I used Simplify, it become like this not that long comparing with the previous:

``````Collect (1/24 ps^(-1 +
n) (k - r) (n y (2 (-((2 k)/3) - r/3 + (3 x (ps x + y))/(
ps (2 k + r)))^(-1 + n) +
3 (-((8 k)/9) - r/9 + (9 x (ps x + y))/(ps (8 k + r)))^(-1 +
n) + 2 (-(k/3) - (2 r)/3 + (3 x (ps x + y))/(
ps (k + 2 r)))^(-1 + n) +
3 (-((7 k)/9) - (2 r)/9 + (9 x (ps x + y))/(
ps (7 k + 2 r)))^(-1 + n) +
3 (-((5 k)/9) - (4 r)/9 + (9 x (ps x + y))/(
ps (5 k + 4 r)))^(-1 + n) +
3 (-((4 k)/9) - (5 r)/9 + (9 x (ps x + y))/(
ps (4 k + 5 r)))^(-1 + n) +
3 (-((2 k)/9) - (7 r)/9 + (9 x (ps x + y))/(
ps (2 k + 7 r)))^(-1 + n) +
3 (-(k/9) - (8 r)/9 + (9 x (ps x + y))/(ps (k + 8 r)))^(-1 +
n) + (-k + (x (x + y/ps))/k)^(-1 +
n) + (-r + (x (x + y/ps))/r)^(-1 + n)) -
ps (2 (-((2 k)/3) - r/3 + (3 x (ps x + y))/(ps (2 k + r)))^n +
3 (-((8 k)/9) - r/9 + (9 x (ps x + y))/(ps (8 k + r)))^n +
2 (-(k/3) - (2 r)/3 + (3 x (ps x + y))/(ps (k + 2 r)))^n +
3 (-((7 k)/9) - (2 r)/9 + (9 x (ps x + y))/(ps (7 k + 2 r)))^
n + 3 (-((5 k)/9) - (4 r)/9 + (9 x (ps x + y))/(
ps (5 k + 4 r)))^n +
3 (-((4 k)/9) - (5 r)/9 + (9 x (ps x + y))/(ps (4 k + 5 r)))^
n + 3 (-((2 k)/9) - (7 r)/9 + (9 x (ps x + y))/(
ps (2 k + 7 r)))^n +
3 (-(k/9) - (8 r)/9 + (9 x (ps x + y))/(ps (k + 8 r)))^
n + (-k + (x (x + y/ps))/k)^n + (-r + (x (x + y/ps))/r)^n)),r)
``````

Posted on Categories Articles