This script computes the formal series expansion of a mathematical function on the command line using the python module swiginac, an interface to the CAS Ginac. Typical invocation in a linux terminal looks like $ serexp.py -n 7 "log(1+x)*(1+x+x**2)**(-1)" 1*x+(-3/2)*x**2+5/6*x**3+5/12*x**4+(-21/20)*x**5+7/15*x**6+Order(x**7) As far as I know, swiginac does not work in windows, so use a virtual (k)ubuntu machine in this case.

Member Avatar
+1 forum 0

#include<stdio.h> #include<math.h> int main() { int n,nstart,nstop,nstep,i,j,zNumber; ` printf("Please enter a value of a positive integer nstart: "); scanf("%d",&nstart); printf("Please enter a value of a positive integer nstop: "); scanf("%d",&nstop); printf("Please enter a value of a positive integer nstep: "); scanf("%d",&nstep); printf("Number\t\tzNumber\n"); printf("------\t\t-------\n"); n=nstart; zNumber= double pow(double_n,double_i); while(i<=nstop){ zNumber = 1; i=1; while(i<=n){ zNumber +=i; i++; } printf("%d\t\t%d\n",n,zNumber); n += nstep; } return 0; }

Member Avatar
Member Avatar
+0 forum 9

Hi Everyone, For a couple weeks, I have been developing a pi approximation program and making little upgrades. Right now, the program asks for an input of iterations and then prints out the approximation. Now, I want to have every iteration printed out into an excel file with an approximation accurate to .000001 [50,000 iterations] However, I realized that the current setup of my program does not work well, so I think some rework is in order. So my goal is to eliminate the input process; and instead, base the iterations on accuracy, not input. That is what I would …

Member Avatar
Member Avatar
+0 forum 2

I'm trying to create a program that computes the values of cos using the Taylor Series as long as the absolute value of a term is greater than 0.0001 and prints the number of terms used in the series approximation. My code is the following and as of right now I am getting the wrong result. Please help me fix it! I've spent hours trying to figure it out and don't know what to do. Enter the angle in radians: 3.14 There were 8 numbers of terms used in the series approximation. The calculated cosine of 3.14 is 0.00499852 The …

Member Avatar
Member Avatar
+0 forum 12

//A1 = 1 //An = An-1 +sqrt(An-1) for n > 1. //i need to find An of the series according to the estimation An=(n^2)/4 //how do i write a member of the series, let's say "An" in the code and to apply "n>1" in the code?

Member Avatar
Member Avatar
+0 forum 1

Yes, I know Fibonacci(=sun of a good man) again. Most famous for his series, but who among you all, know that he was the man who introduced to the Western world, the Arabic numeral system(including zero) in 1202 A.D.? The Italian merchands of those days adored it. It was far more easy to work with than the roman numeral system of course. And it is still in use today. I did the series a little different with a calculation that gives you any Fibonacci number from zero up to the 93th one. I guess the Convert method does the rounding. …

Member Avatar
Member Avatar
+2 forum 7

How to find this series without using power function in c 1+x/1!+x2/2!+x3/3!+x4/4! please help me out i'm unable to solve these type of questions

Member Avatar
Member Avatar
+0 forum 3

How to find this series without using power function in c 1+x/1!+x2/2!+x3/3!+x4/4! please help me out i'm unable to solve these type of questions

Member Avatar
Member Avatar
-1 forum 3

Pls help me on this. I really dont have an idea of solving this. Here's the question .. 1. Write a c++ program that generates the following series: 0 -1 4 -9 16 -25 36 -49 64 -81 100 and also this one 2. write a program that generates the fibonacci series: 1 1 2 3 5 8 13 up to 50th term. I was shocked when i saw this :-O It is not yet taking up. But pls. Help me. Thanks alot.. - Nell

Member Avatar
Member Avatar
+0 forum 5

/*PROGRAM TO PRINT SUM OF THE FOLLOWING SERIES - X + X*X/2! + X*X*X/3! + X*X*X*X/4!....n terms. I'm not getting the correct output. eg-for n=3 and x=2; compiler's ans = 4.66 correct ans = 5.3. HELP ME OUT...*/ [CODE]#include<iostream.h> #include<math.h> #include<conio.h> void main () { clrscr(); float x,sum=0; int n,fact=1,j,k; cout<<"\nEnter For n"; cin>>n; cout<<"\nEnter For X"; cin>>x; for(int i=1;i<=n;++i) { j=i; k=i; { while(j) { fact=fact*j; --j; } } sum+=pow(x,k)/fact; } cout<<"The Sum Of Series Is:"<<sum; getch(); } [/CODE]

Member Avatar
Member Avatar
+0 forum 7

How to print this series using loop 1,1,2,3,5,8,11,19,30,49...........

Member Avatar
Member Avatar
+0 forum 6

We are required to make a c++ program to determining the cos of x by using the taylor series. i have made my program and it works pretty good but we are also required to stop the loop after the terms in the taylor series gets lower than .0001. any suggestions? (Taylor Series for cos = 1 - x^2/2! + x^4/4!...) [CODE] #include <iostream> #include <cmath> using namespace std; double fac(int n) { double f=n; while (--n)f*=n; return f; } int main() { double long x; cout << "Enter Angle in Radians: " << endl; cin >> x; double cos(0.0); …

Member Avatar
Member Avatar
+0 forum 1

How to get the following output using c? ---1 --12 -345 6789 Please guide me with the code. It can be a blank space instead of '-'.

Member Avatar
Member Avatar
+0 forum 8

The End.