필터 지우기
필터 지우기

How can I write the taylor series expansion for the function (1+x^2)^(-1/2) in code

조회 수: 3 (최근 30일)

Hello. I am trying to get this taylor series expansion in code but I am having a hard time. I attached a picture of the function and its taylor series expansion. I thought of using the factorial function but I don't think that will work here. Thank you for the help.

  댓글 수: 2
Geoff Hayes
Geoff Hayes 2018년 7월 5일
Joshua - no, you probably don't need to use the factorial function here. But from what you have shown, what is the pattern? Once you figure that out then the expansion should be easy.

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2018년 7월 5일
편집: Torsten 2018년 7월 5일
a0 = 1
an = -a(n-1) * (2*n-1)/(2*n)
  댓글 수: 4
JoshT_student
JoshT_student 2018년 7월 5일
Thank you Torsten, now to get 50 terms of it, I just need to put it in a for loop?
Torsten
Torsten 2018년 7월 6일
x=0.5;
f=1.0;
a=1.0;
xn=1.0;
n=25;
for i=1:n
a=-a*(2*i-1)/(2*i);
xn=xn*x^2;
f=f+xn*a;
end

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by