Highlights
Task:
Question 6 (20 pts)
Write a lisp program to compute the series for the sin(x) and cos(x) depending on the value of n. The function takes 2 arguments (x and n) and based on the value of n calculates one of the following functions:
sin-cos-comp (x, n)
{
sin(x) . x _ x3 + x5 x7 xn 31 5T. — T j_ -1- • • • + n!
, xn 4V*** -1- 771 cos(x) . 1 _ c! + x4! — x6 +
-10 <x <10,n is odd
n is even
You are not allowed to use any inbuilt functions except predicate functions to check value type. Your program should print an appropriate message for string and decimal values for n. Additionally, there is a limit for x when n is an odd number.
Question 7 (20 pts)
In mathematics, the Pell numbers are an infinite sequence of integers, that comprises the denominators of the closest rational approximation to the square root of 2. The sequence of approximations begins with ....
1 3 7 17 41 1 2 5 12 29
So the sequence of Pell numbers begin with 1, 2, 5, 12, 29,..... The Pell numbers are defines as follow: 0 if n = 0 Pn = 1 if n = 1 2Pn-i + Pn-2
otherwise
Writ a lisp program that computes the Pell numbers for an input argument n using:
a) An iterative approach b) A recursive approach
For example pellnumbers (6 ) should return a list (0 1 2 5 12 29 70)
Write at least 2 test cases for each version (a and b).
This Mathematics Assignment has been solved by our Mathematics Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.