Question

Get taylor's string from ln (1 + x) and do the coding in C ++ OOP.

Get taylor's string from ln (1 + x) and do the coding in C ++ OOP.

Homework Answers

Answer #1

(1 + n)th term of taylor series is given by (x^n)/n! , where series starts with 1.

#include<stdio.h>

#include<math.h>

int main()
{
    printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");

    int x,i;
    int fact = 1,n;
    float sum=0;

    printf("\n\nEnter the value of x in the series :  ");
    scanf("%d",&x);

    printf("\nEnter the number of terms in the series  :   ");
    scanf("%d",&n);

    for(i=1;i<n;i++)
    {
        fact = fact*i;
        sum = sum + (pow(x,i)/fact) ;

    }
    sum= sum +1; //Since series starts with 1

    printf("\n\nThe sum of the taylor series is :  %.2f\n\n",sum);

    printf("\n\n\n\n\t\t\tCoding is Fun !\n\n\n");
    return 0;
}
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
f(x)=ln(1+2x), a=4,n=3,3.7<=x<=4.3 (b) Use Taylor's Inequality to estimate the accuracy of the approximation f  Tn(x) when x...
f(x)=ln(1+2x), a=4,n=3,3.7<=x<=4.3 (b) Use Taylor's Inequality to estimate the accuracy of the approximation f  Tn(x) when x lies in the given interval. (Round the answer to four decimal places.)
Consider the following function. f(x) = ln(1 + 2x),    a = 1,    n = 3,    0.8 ≤ x ≤...
Consider the following function. f(x) = ln(1 + 2x),    a = 1,    n = 3,    0.8 ≤ x ≤ 1.2 (a) Approximate f by a Taylor polynomial with degree n at the number a. T3(x) = (b) Use Taylor's Inequality to estimate the accuracy of the approximation f(x) ≈ Tn(x) when x lies in the given interval. (Round your answer to six decimal places.) |R3(x)| ≤ (c) Check your result in part (b) by graphing |Rn(x)|.
Differentiate but do not simplify: a) x^2(ln(x))^2 b) x^3(arctan(x))^3 c) (ln(x))^2 d) (arctan(x))^2
Differentiate but do not simplify: a) x^2(ln(x))^2 b) x^3(arctan(x))^3 c) (ln(x))^2 d) (arctan(x))^2
C++ How do you get the first character of a string? The last character? How do...
C++ How do you get the first character of a string? The last character? How do you remove the first character? The last character?
Find a Taylor series centered at c for f(x) = ln(x^2), c=1
Find a Taylor series centered at c for f(x) = ln(x^2), c=1
Find the derivative of f(x) = 3^(x ln x) and f(x) = ln( 1/ x )...
Find the derivative of f(x) = 3^(x ln x) and f(x) = ln( 1/ x ) + 1/ ln x
Find the derivative. a. (e3x)/x b. SqrRt(10x+9) c. x ln(x)
Find the derivative. Do NOT simplify answers.a. (e3x)/xb. SqrRt(10x+9)c. x ln(x)
differentiate. a. e^xtan(x) b. sin(1/sqrtx) c. ln(e^x/sqrt(x^2)+3) d. subscriptx tan(x) e. f(secx) where f'(x)= x/ln(x)
differentiate. a. e^xtan(x) b. sin(1/sqrtx) c. ln(e^x/sqrt(x^2)+3) d. subscriptx tan(x) e. f(secx) where f'(x)= x/ln(x)
Problem 1. (1 point) Find the critical point of the function f(x,y)=−(6x+y2+ln(|x+y|))f(x,y)=−(6x+y2+ln(|x+y|)). c=? Use the Second...
Problem 1. (1 point) Find the critical point of the function f(x,y)=−(6x+y2+ln(|x+y|))f(x,y)=−(6x+y2+ln(|x+y|)). c=? Use the Second Derivative Test to determine whether it is A. a local minimum B. a local maximum C. test fails D. a saddle point
1. Solve the equation ln(x + 5) − ln(x − 3) = 1 for x. 2.Find...
1. Solve the equation ln(x + 5) − ln(x − 3) = 1 for x. 2.Find all values of x for which the following function has a tangent line of slope 0 (i.e. f 0 (x) = 0). f(x) = e^2x+1 (2x + 5) 3.Calculate limx→−5 1 − √ x + 6/x + 5
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT