Mathematica Problem in derivative of big eqaution in mathematica

AI Thread Summary
The discussion centers on using Mathematica to derive and solve a complex equation involving summation and derivatives. The user is experiencing errors and seeks guidance on how to correctly format the equation in Mathematica. A suggested approach includes using the Sum function for summation and the D function for differentiation, with a specific example provided for clarity. The conversation highlights the importance of correctly defining variables and constants within the equation, particularly regarding the treatment of indices and the structure of the summation. The user expresses gratitude for the assistance received and indicates ongoing challenges with more complex variations of the equation, specifically regarding the handling of multiple variables from a database. Overall, the exchange emphasizes the intricacies of coding mathematical expressions in Mathematica and the need for precise syntax.
funyhony
Messages
7
Reaction score
0
i want to put this equation in mathematica to have derivative


i always have error

please tell me how to write it in mathematica to get the derivative

also to solve the equation

i attache the equation in word file
 
Physics news on Phys.org
attached file here
 

Attachments

This is not a complete solution to your problem, but perhaps this will get you started:

J = Sum[Subscript[y, m]Log[Subscript[P, m]] +
(1 - Subscript[y, m])Log[1 - Subscript[P, m]], {m, 1, M}]-
\[Lambda]/K Sum[Sum[(Subscript[P, m]Subscript[P, mPrime])^2,
{mPrime, unknown, unknown}], {m, 1, M + CapN}];
Solve[D[J, Subscript[P, m]] == 0, Subscript[P, m]]

You have to provide more information or figure out on your own whether K is a constant in one place and a function on mPrime in another or somehow find a way to bring your idea of summing over selected elements of a set in line with Mathematica's idea of Sum working with an index variable over a sequential list of integral values. Adjust that inner Sum[] and {mPrime, unknown, unknown} accordingly. It is possible to toss out Sum and use other methods, but I'm guessing from your question that you might not be up to figuring that out.

One other polite comment. I do realize that many people have come to believe that they must, or at least should be able to, "desktop publish" everything they do, inside and outside Mathematica, including subscripts, superscripts, primes, choosing case that matches the notation from a paper or personal choice, etc. In my experience that usually seems to make the task about twice as hard to do. Maybe you will have better luck. You may find in a variety of ways and places in Mathematica that support for this is uneven and mixed and difficult to diagnose when something doesn't work as expected, above and beyond the usual level of Mathematica being cranky and difficult to diagnose why something isn't working. I hope it works out for you.
 
Last edited:
Dear Bill
i really thank you for your help i really learned from you i couldn't know how to write m' and the sum , i was writing them as in word equation

i still have problem in the part of summition m' k(xm)

i don't know how to put the unknown values
i'll try again and tell you what happened

i've more complicated equation with Pmi and m is rows and i is columns from a data base, i mean Pmi have many variations
can this equation be derived and solved with mathematica to get Pmi equation

i really approciate your help so much
thanks so much :)
 
Back
Top