联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codehelp

您当前位置:首页 >> C/C++程序C/C++程序

日期:2020-09-28 08:44

Assignment 1
MACM 204
Fall 2020
The purpose of this assignment is to learn the basics of Maple: how to input formulas, how to graph
functions, solve equations, calculate derivatives and integrals, and to program some loops.
The assignment is due Tuesday September 29th at 11:00am. Do all calculations in Maple in a single
worksheet. Separate clearly your solutions for each question (use text headings Question 1, Question 2,
... ). Export the worksheet as PDF and upload a single PDF file to the Crowdmark link that you
received by e-mail.
Write the assignment number, course number, your name and student number on top of the Maple
worksheet.
Question 1
Consider the function Construct a plot of [ ] on the same
graph for the domain .
Read the help page for ?plot,options. Using the appropriate options, create a legend for the
plot, and add a title.
Question 2
Using the evalf command, calculate the following values to 20 decimal places.
, =1.648..., 1.912..., ... and ...
Question 3
Consider the polynomials and and
Graph each separately on a suitable domain for so that we can see all real roots.
Now factor the polynomials using the factor command.
Why does the factor command not factor them into linear factors?
Now, using solve, solve for the roots. Using Maple, verify that the 4 roots of the polynomial g are
correct.
Now, using fsolve, solve for numerical approximations of the roots, including the complex roots.
Read the help page for ?fsolve to find out how to get the complex roots.
Question 4
Shown in the plot below is a plot of on the domain -2.5 < < 2. Shown also
is the line tangent to at .
Use Maple to reproduce the plot. Do this by using the diff and eval commands to compute the slope
of at so you can determine the equation for the tangent line.

Now express the area enclosed by the tangent line and as a definite integral.
Evaluate the definite integral using Maple.
Question 5
Consider the two equations and which are the equations of an elliptic curve
and a circle. Graph the two curves together using the implicitplot command in the plots package.
Improve the smoothness of the plot using the grid option. The circle will appear distorted. Find out
from ?plot,options how to scale the axes so that the circle looks like a circle (so that the plot looks
like the figure below).
You can read off from the plot roughly where the curves intersect.
Use Maple to calculate the intersection points accurately.
Do this by solving two equations simultaneously.
Question 6
Calculate the following antiderivatives in Maple.
(i) (ii) (iii) .
To check that the results are correct, use Maple to differentiate each antiderivative.
Question 7
Suppose you are given a Maple list L of numbers which are the roots of a polynomial . Write a
Maple for loop that constructs the polynomial. For example, if L = then the value of
should be the polynomial .
Question 8
Using a Maple loop, and the isprime command, find the first prime .
Question 9
Consider the odd primes 3, 5, 7, 11, 13, 17, 19, etc.
Let S be the odd primes congruent to 1 mod 4 and T be the odd primes congruent to 3 mod 4.
So S = 5, 13, 17, 29, etc. and T = 3, 7, 11, 19, 23, etc.
Suppose we go through the odd primes in order counting the number of primes in S and T.
So at the first step S = { } and T = {3} so T has more primes than S.
At the second step S = {5} and T = {3} so S and T have the same number of primes.
At the third step S = {5} and T = {3,7} so T has more primes than S again.
Here is a little table counting the size of S and T for the first 10 primes
Prime 3 5 7 11 13 17 19 23 29 31
|S| 0 1 1 1 2 3 3 3 4 4
|T| 1 1 2 3 3 3 4 5 5 6
Notice that for the first 10 primes. Does it ever happen that ? Yes, it does.
When? How often?
Using the builtin nextprime command write a loop that counts and for primes up to 10^6
and prints out the the first time and, at the end, how often
Question 10
Let . Recall that the value of A may be approximated by the Trapezoidal rule on n
intervals of width using the formula
.
For and , calculate using Maple to 10 decimal places by using
Maple's integration command. Now using a Maple loop, calculate and using 10 digit
arithmetic (the default) .

版权所有:留学生编程辅导网 2021,All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。