cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Mathcad 15 index summation

JB_10220769
7-Bedrock

Mathcad 15 index summation

Is it possible to to index the summation for odd numbers in 15?

4 REPLIES 4

Maybe that way:

Werner_E_0-1656540197752.png

 

Or you may redefine your function f(..) to return zero for even values of n:

Werner_E_1-1656540384435.png

or, as a variation, you may put the branch into the sum instead of the function f:

Werner_E_2-1656540502233.png

 

And as my last solution for now you may do without the summation operator and program the summation yourself:

Werner_E_0-1656540892061.png

The last will not work for a=1 unless you add some kind of branch (if).

 

I tried to follow the same method in my original programming but the solution does not converge while matlab can

Can you share your views 

You may want to look at the functions An and k_n.

The constant factor in C_b is a quite low pure imaginary number and for most odd values of n the summand is a very small imaginary number , too. But for some odd values of n the summands seem to "explode".

This may also be due to numerical inaccuracies - compare the result of the numeric to the symbolic evaluation shown in the picture for b=21. But both values are quite large so you may want to recheck your function definitions.

Werner_E_0-1657034332440.png

There is also a significant difference when I evaluate C_b (for m=41) when evaluated symbolically:

Werner_E_1-1657034355798.png

 

I just noticed that when you define the function An you already have k_n(n,h) in the denominator. When you define C_b you have the same function again in the denominator of the summands. Guess this was not done on purpose?

 

BTW, you should omit the first argument n in your function definition of C_b as n is the summation index anyway.

 

 

Top Tags