It's not really clear to me what your issue is. The are several things that hinder us from making progress.
- You don't give the expected result.
- You don't explain what
S
is.
In any case, let's start a bit slowly.
You can take the derivative of what you have provided and perform a FullSimplify
in the following way
D[-t1 Log[E^a/(E^a + E^b)] - t2 Log[E^b/(E^a + E^b)],
a] // FullSimplify
The result of the above is:
-t1 + (E^a (t1 + t2))/(E^a + E^b)
So, as you can see you have the desired combination t1+t2
without much effort. You can now apply a replacement rule imposing your rule like so:
(D[-t1 Log[E^a/(E^a + E^b)] - t2 Log[E^b/(E^a + E^b)], a] //
FullSimplify) /. t1 + t2 -> 1
This yields:
E^a/(E^a + E^b) - t1
If you can define what S
we can proceed somehow, I guess. But the logic is to try FullSimplify
and imposing the conditions that you want as rules. If you don't impose said conditions Mathematica cannot know what you want to do.
Edit: if we make a wild guess that S
stands for the sum of the exponents, we can proceed in the following manner.
(D[-t1 Log[E^a/(E^a + E^b)] - t2 Log[E^b/(E^a + E^b)], a] //
FullSimplify) /. t1 + t2 -> 1 /. Exp[a] + Exp[b] -> S
which gives
E^a/S - t1
and a final step is
(D[-t1 Log[E^a/(E^a + E^b)] - t2 Log[E^b/(E^a + E^b)], a] //
FullSimplify) /. t1 + t2 -> 1 /. Exp[a] + Exp[b] -> S /.
Exp[a]/S -> y1
giving you:
-t1 + y1
Is this what you wanted?
S
is, since it is not explained in the OP. $\endgroup$