0
$\begingroup$

From an analytical computation I get an equation G1:

G1 = Sum[ (Log[y[i]] - u) / s^2, {i, 1, n}] == 0

Solve can not handle this equation and find a solution for u. Furthermore when writing G11 as

G11 = s^2 G1

G11 is essentially returned unevaluated. Mathematica can not be convinced to multiply the s^2 term into the equation -- which would be perfectly OK for all s != 0. I then used a different approach:

G12 = G1 //. s -> 1

which produced the desired result:

enter image description here

Mathematica still can not solve this equation for u.

Note: for simplicity I used u above instead of μ.

$\endgroup$
1
$\begingroup$

Try this.

Here is your equation:

eq = Sum[(Log[y[i]] + u)/s^2, {i, 1, n}] == 0;

This solves it:

sl=Solve[MapAt[Distribute, MapAt[Apart, eq, {1, 1}], 1], u]

enter image description here

You may then want to also cancel s^2:

sl /. Sum[Times[a_, Log[y[i]]], {i, 1, n}] ->a*Sum[Log[y[i]], {i,1,n}]

enter image description here

Done. Have fun!

| improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.