Problem of summation-mathematica

  • Mathematica
  • Thread starter shafieza_garl
  • Start date
In summary, Mathematica allows you to differentiate a summation equation with respect to a specific variable and also replace variables with values using the ReplaceAll function.
  • #1
shafieza_garl
20
0
MATHEMATICA:differentiate the summation

I need help.im having problem to differentiate my equation respect to the m_i;How can i differentiate the equation.
Second question is;When i set Y=2;how can i put the parameter like m_1;m_2;S_1;S_2;
what i just do is input it manually by changing m_1=m1;m_2=m2;
its very difficult if Y become larger number
Code:
Sum[(Subscript[\[Sigma], i] - Subscript[c, i])*(Subscript[q, i]/
          Subscript[T, i]), {i, 1, Y}] - 
   Sum[((1 - \[Beta])/(2 - \[Beta]))*(Subscript[d, i]*
      Subscript[q, i]) + 
       (1/2)*((Subscript[m, i] - 1)*Subscript[w, i]*Subscript[q, i]) + 
       (Subscript[A, i]/Subscript[m, i] + Subscript[S, i])/
         Subscript[T, i], {i, 1, Y}]
Thanx for da help
 

Attachments

  • problem1.bmp
    114.6 KB · Views: 570
Last edited:
Physics news on Phys.org
  • #2
Y=2;
s=Sum[...];
d=D[s,Subscript[m,1]];
d/.Subscript[m,1]->4
 
  • #3
Thanx a a lot for da help.but what is da function of
Code:
 d /. Subscript[m, 1] -> 4
and do you know how can input the subscript like m_1 and m_2 if they have value ?
 
  • #4
expression/.variable->value
is an alternate way of writing the ReplaceAll function.
That function replaces all variable with value in expression.
Here is the documentation for ReplaceAll.
http://reference.wolfram.com/mathematica/ref/ReplaceAll.html
If you look at the value of the variable d in my code and compare that
with the value after the ReplaceAll you can see what it has done.

I am not certain I understand what you mean "if they have value."
If they have value then they are not a variable in your expression
and there is no variable to replace with a value.
 
  • #5


The problem of summation in Mathematica can be solved by using the Sum function. To differentiate the equation with respect to m_i, you can use the D function and specify the variable as m_i.

For example, if your equation is written as f = Sum[m_i*x_i, {i, 1, Y}], then to differentiate it with respect to m_i, you can use the command D[f, m_i].

To set Y=2 and input the parameters m_1, m_2, S_1, S_2, you can use the Subscript function in Mathematica. For example, if you want to set m_1=m1, m_2=m2, S_1=S1, S_2=S2, you can write it as m_1 = Subscript[m, 1] = m1, m_2 = Subscript[m, 2] = m2, S_1 = Subscript[S, 1] = S1, S_2 = Subscript[S, 2] = S2.

It is important to note that when Y becomes a larger number, it is not practical to manually change the parameters. In this case, you can use loops or a list to input the parameters. For example, you can use a Table or Do loop to input the parameters for each value of Y.

Overall, Mathematica has many tools and functions that can help you solve problems with summations and differentiate equations. It is important to familiarize yourself with these functions and use them to efficiently solve your problems.
 

Related to Problem of summation-mathematica

What is the "Problem of summation-mathematica"?

The "Problem of summation-mathematica" refers to the difficulty in accurately summing up a series of numbers using the computer algebra system Mathematica. This problem arises due to the limitations of computer precision and the potential for round-off errors.

Why is it important to address this problem?

The "Problem of summation-mathematica" can lead to incorrect results and inaccurate data analysis. This can have serious consequences in fields such as engineering, finance, and scientific research where precise calculations are crucial.

What methods are commonly used to solve this problem?

Various methods have been proposed to address the "Problem of summation-mathematica", such as using higher precision arithmetic, applying numerical techniques, and implementing special algorithms for specific types of series. Some users also resort to manual calculations to verify results.

Can this problem be completely eliminated?

Unfortunately, due to the inherent limitations of computer precision, it is not possible to completely eliminate the "Problem of summation-mathematica". However, by using appropriate techniques and being aware of potential sources of error, the accuracy of the results can be greatly improved.

How can I avoid encountering this problem in my calculations?

To minimize the impact of the "Problem of summation-mathematica", it is important to carefully choose the appropriate method for summing up a series, check the precision settings in Mathematica, and be aware of any potential sources of error. It is also recommended to verify results through manual calculations or using alternative software.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
568
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
280
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Introductory Physics Homework Help
Replies
29
Views
955
  • Introductory Physics Homework Help
Replies
1
Views
949
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
233
Back
Top