How do I write the following summation for power series in code ?

Technical Source
2 min readAug 4, 2023

--

I need to solve for the above power series and plot the solutions from the above formula against radius.

‘a’ is the coefficeint in the power series and ‘p’ is a dimensionless radial coordinate, n= 0 ,1,2, …, infinity.’q’ is a pressure term.

Also, I have found the values of ‘a’ for a0 , a2 , a4 , so how do I code the above formula such that the specific values of ‘a’ are called as well as the summation is done?

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Hi, I understand that you are trying to compute the above function for a specific value of ‘p’ . Assuming that you have coefficients stored in an array in the format

a = [a0 a2 a4 so on..];

You can try to sum first 100 terms or till the available coefficients.

Here is the code for it

for i = 1:size(a)
Wp = Wp + a(i)*(1 - p^(2*i +2));
end
Wp = Wp * q^(2/3);

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.