Description
I need help on mathematics using Julia, it has to be done using jupyter notebook. Use your discretion as to what is discrete and continuous. The total there are 8 questions needs be solve. I will be turn in ipynb. I attached it below
3 attachmentsSlide 1 of 3attachment_1attachment_1attachment_2attachment_2attachment_3attachment_3
Unformatted Attachment Preview
Problem 002
Earlier in class we derived the Taylor series for y = sin(x). We will now recreate that function using Julia. Consider the nth-order polynomial approximation,
Pn, from the Taylor series.
Pn(x) =
(-1)*x2k+1
(2k + 1)!
k=0
We know from before that this function has a Python definiton given by:
def Pan, x):
answer = 0
for k in range(n):
answer += (-1)******* (2*k+1)/np.math.factorial(2*k+1)
return answer
In [5]:
function P(n,x)
answer = 0
# Your code should go here
for (i in 1:n)
answer = answer + ((-1)^i*x^(2*1+1))/(factorial(2*1+1))
end
return answer # Return your answer
end
syntax: invalid iteration specification
Stacktrace:
[1] top-level scope at In[5]:5
[2] include_string(:: Function, :: Module, ::String, :: String) at .loading.jl:1091
Purchase answer to see full
attachment
Tags:
Math Problems
Discrete Mathematic
User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.
Reviews, comments, and love from our customers and community: