Download Feedback Exercises 2 with solutions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Trigonometric functions wikipedia , lookup

Transcript
MTH4105 Introduction to
Mathematical Computing
School of Mathematical
Sciences
Feedback Exercises 2:
Introduction to Maple functions
© 2014 by Dr Francis J. Wright
Answer the questions below in a copy of the answer template document available from
QMplus. We will record your coursework submission as evidence that you are engaging
with this module. Failure to submit coursework may result in you being deregistered.
When answering the questions, use standard typography for any mathematical notation that
you include. Use hyperlinks for any web references and spell check the document before
submitting it. Upload you completed answer document to QMplus by the deadline, which
will normally be about a week after each question sheet is released on QMplus. The precise
deadline and submission mechanism are specified in QMplus. You will be provided with
feedback on your answers and I will release example solutions after the submission
deadline.
Question 1
Using appropriate nested function applications, evaluate the inverse sine of the sine of x
1
3
for x = 0.5, 1.0, 1.5, 2.0 and for x = , 1, , 2. Write a sentence or two to explain your
2
2
results, in particular why the result is not always the same as the value of x. This may
require some research. Then do the same for the sine of the inverse sine. You may use
any source of information (such as the Maple help and Wikipedia) to help you explain
your results. (Note that I is the default representation in Maple for the imaginary unit,
which mathematicians more usually represent as i. A number containing the imaginary
unit is a complex number.)
My answer
> arcsin sin 0.5 , arcsin sin 1.0 , arcsin sin 1.5 , arcsin sin 2.0
0.5000000000, 1.000000000, 1.500000000, 1.141592654
> arcsin sin
1
2
, arcsin sin 1 , arcsin sin
3
2
(1.1.1)
, arcsin sin 2
1
3
, 1, , K2 Cπ
(1.1.2)
2
2
One would expect an inverse function to undo the effect of applying the function,
which is indeed what happens in simple cases. However, multi-valued functions such
as inverse trigonometric functions return their principal values and the principal value
π
π
of arcsin lies between K and . If the value of x is outside this range then the
2
2
π
since π ! 4. The exact
result will not be the same as the value of x, and 2 O
2
MTH4105 / FJW
Page 1 of 2
25-Sep-2014
computations make this clearer than do the approximate computations.
> sin arcsin 0.5 , sin arcsin 1.0 , sin arcsin 1.5 , sin arcsin 2.0
0.5000000000, 1., 1.500000000 C2.293125509 10-10 I, 2.000000000
C3.552494763 10
> sin arcsin
1
2
-10
(1.1.3)
I
, sin arcsin 1 , sin arcsin
3
2
, sin arcsin 2
1
3
, 1, , 2
(1.1.4)
2
2
A function is the inverse of its inverse and sin is a well-defined single-valued function,
so one would expect sin arcsin x = x always. However, the sine of any angle lies
between K1 and C1, so the inverse sine of a number outside that range cannot exist
as a real number. In fact, it is a complex number, and computing its sine
approximately leads to a very small error that is also a complex number, whereas
exact computation does not suffer from this problem and always gives the result one
would expect.
Question 2
2
2
Differentiate cos x with respect to x and integrate the result. Then differentiate sin x
with respect to x and integrate the result. Write a few sentences to explain why you get
back to the original expression in one case but not the other. Is one result wrong?
Explain how you can recover the original expression in both cases.
My answer
d
cos2 x = K2 cos x sin x and K2 cos x sin x dx = cos x 2, whereas
dx
d
sin2 x = 2 cos x sin x and 2 cos x sin x dx = Kcos x 2. Maple does not
dx
provide the arbitrary constant of integration that always forms part of an indefinite
integral, the value of which must be determined separately from the integration
process. In the first example, it happens that the value for the constant of integration
necessary to obtain the original expression is zero. In the second case, the general
result of the indefinite integration is 2 cos x sin x dx Cc = Kcos x 2 Cc. To obtain
the original expression, we require the constant of integration to satisfy the equation
2
2
2
2
Kcos x Cc = sin x , i.e. c = sin x Ccos x = 1.
MTH4105 / FJW
Page 2 of 2
25-Sep-2014