Write a python program to print the sum of the following nth series.
a. -X + x^2- x^3+ x^4+...
b. 1 + (1+2) + (1+2+3) +...
c. 1 - x + x^2/2! - x^3/3! +...
please I want correct answer it's urgent for me
Answers
Answer:
a.The right side is a geometric sequence which can be written as:
a(1−rn)/(1−r)a(1−rn)/(1−r) where a=1,n=5 and r=x
121=(1−x5)/(1−x)121=(1−x5)/(1−x)
121−121(x)=1−x5121−121(x)=1−x5
x5−121∗x+120=0x5−121∗x+120=0
This has 5 solutions, use your preferred method to find them, one of them will not satisfy the equation you wrote ( x = 1), since (1−x5)/(1−x)=0/0(1−x5)/(1−x)=0/0 and since your equation can have 4 answers only.
Edit : I used my calculator and found SS={3,-3.528}
You can try to find the intersection between x^5 and 121*x - 120
just sketch it on a paper u will find that it intersects at x=1,3 and a negative no. x=-3.528, after x=3 x^5 increases at a much higher rate so there is no intersection after x=3, the same before x=-3.528
the remaining solutions are complex numbers.
Edit 2:to get the complex solutions you would have to divide x5−121∗x+120x5−121∗x+120 by (x−1)(x−3)(x+3.528)(x−1)(x−3)(x+3.528) and put the equation in the form of (x−1)(x−3)(x+3.528)(x+s4)(x+s5)=0(x−1)(x−3)(x+3.528)(x+s4)(x+s5)=0 where (x+s4)(x+s5)(x+s4)(x+s5) is what u get from the divison.
I hope someone can get a more elegant and easier answer than this.