| > | "Assignment 1: Mth101: due 18th March 2005": |
| > | "Question 1": |
| > | "a)": |
| > | f1a := x -> sqrt(5-2*x):
plot(f1a(x),x=-2.5..2.5); 0,f1a(0); solve(f1a(x)=0,x),0; |
![[Plot]](images/ass1_mth101_2005_1.gif)
| > | "Notice the intercepts at (2.5,0) and (0,sqrt(5))
and the fact it ends at (2.5,0) 1 mark for shape, 1 mark for non-negative, 1 mark for x intercept Domain = {x <= 2.5} (1 mark) Range = {y >= 0} (1 mark)": |
| > | "b)": |
| > | plot(x-x^2,x=-1..2);
# Notice the x values are zoomed around the important features |
![[Plot]](images/ass1_mth101_2005_4.gif)
| > | "Notice intercepts at (0,0) and (1,0)
1 mark for shape, 1 mark for max and 1 for intercepts. Max at": |
| > | f1b := x -> x - x^2:
xsol := solve(D(f1b)(x)=0,x): ysol := f1b(xsol): (xsol, ysol); |
| > | "So, Domain = {all x} (1 mark)
Range = {y <= 1/4} (1 mark) Total marks for Q1: 10": |
| > | "Q2: evaluate some limits": |
| > | "a": |
| > | f2a := x -> x^2 - x + 1:
"Since f2a(x) is continuous, the limit as x -> -2 is simply f2a(-2)": limit(f2a(x),x=-2), f2a(-2); "1 mark for subbing in/using limit properties, 1 mark for answer": |
| > | "b": |
| > | f2b := x -> (x^2 - 4*x+4)/(x^2-4):
f2b(2); |
Error, (in f2b) numeric exception: division by zero
| > | "Notice f2b is not defined at 2, so before taking limit,
we shall try to simplify, do so by factorising": factor(f2b(x)); |
| > | "We can now substitute in x = 2":
limit(f2b(x),x=2),eval(factor(f2b(x)),x=2); "2 marks for recognising cannot sub in 2, 1 mark for factorising, 1 mark for answer": |
| > | "c": |
| > | f2c := x -> (x^2 + 1)/(2*x^2-4):
f2c(infinity); |
| > | "When taking limits to infinity, we cannot simply sub in.
You can use L'Hopital's rule (with justification of course), however here let's make the following observation": limit(1/x,x=infinity); "is": |
| > | "Indeed": assume(n > 0): "then": limit(1/x^n,x=infinity); "is": |
| > | "In order to use this rule, we divide top and bottom of
the expression by x^2": newtop := expand((x^2 + 1)/x^2); newbottom := expand((2*x^2 - 4)/x^2); |
| > | "Then using the additive property of limits,":
limit(newtop,x=infinity); "is": |
| > | "and": limit(newbottom,x=infinity); "is": |
| > | "Therefore the desired limit is":
limit(newtop,x=infinity)/limit(newbottom,x=infinity), limit(f2c(x),x=infinity); |
| > | "1 mark for indentifying method (eg giving
limit(1/x,x=infinity) = 0 or mentioning L'Hopital), 1 mark setting up (eg multiplying by (1/x^2)/(1/x^2) or justifying L'Hopital's) 1 mark for using method correctly, 1 mark for answer Total marks for Q2: 10": |
| > | "Q3: take derivatives
(2 marks each, generally 1 mark for rule, 1 for answer); Note in Maple you can use the following": |
| > | with(Student[Calculus1]):
DiffTutor(x^5 + 2*x^(-2)+sqrt(x)); "to help you using the rules": |
| > | "Remember to get help in maple, type
?DiffTutor; ": |
| > | "a":
f3a := x -> x^5 + 2 * x^(-2) + sqrt(x): |
| > | "First rewrite sqrt(x) as x^(1/2),
then use the following three rules": diff(a(x)+b(x),x) = diff(a(x),x)+diff(b(x),x): diff(k * a(x),x) = k * diff(a(x),x): " where k constant": diff(x^n,x) = n*x^(n-1): |
| > | "Thus the answer is": D(f3a)(x); |
| > | "b":
f3b := x -> (x^2 + 4)^5: |
| > | "To take the derivative either firstly expand (which is
difficult by hand) or preferably use the chain rule": |
| > | "The answer is": D(f3b)(x); |
| > | "(Alternatively)": diff(expand(f3b(x)),x); factor(%); |
| > | "c":
f3c := x -> (x+2)/(x-3): |
| > | "Use quotient rule to get": D(f3c)(x); factor(%); |
| > | "(Alternatively, rewrite f3c(x) as":
f3cn := x -> 1 + 5/(x-3): "then use chain rule)": D(f3cn)(x); |
| > | "d":
f3d := x -> ln(3*x^2 + 2): |
| > | "Use chain rule, and recall":
diff(ln(x),x) = 1/x: "Or more generally": diff(ln(f(x)),x) = diff(f(x),x)/f(x): "(1 mark for using this)": D(f3d)(x), diff(3*x^2 + 2,x)/(3*x^2 + 2); |
| > | "e":
f3e := x -> exp(sin(x)): |
| > | "Use chain rule, recalling":
diff(exp(x),x) = exp(x): "Or more generally": diff(exp(f(x)),x) = diff(f(x),x)*exp(f(x)): "(1 mark for using this)": "Also": diff(sin(x),x) = cos(x): D(f3e)(x); |
| > | "10 marks total for Q3": |
| > | "Q4: use implicit differentiation to find slope of the curve":
f4 := x^2*y + y^2 = 2: "at": pnt := [x=1,y=1]: |
| > | "Take derivatives of of both sides with respect to (wrt) x,
using product rule, chain rule and _importantly_ noting that y is an (implicit) function of x": "for example the lhs becomes": diff(x^2*y(x) + y(x)^2,x); |
| > | # 1 mark for rhs
# 1 mark product rule on x^2*y # 1 mark for y^2 -> 2*y or 2*y*dydx # 2 marks for trying to treat y as a function of x # 1 mark for correct lhs "Then make dy/dx the subject of new equation": # 1 mark dydx := implicitdiff(f4,y,x); |
| > | "So dy/dx at (1,1) is": m := eval(dydx,pnt); # 1 mark |
| > | "General equation of a tangent at (x_0,y_0) with slope m is":
tangent := y - y_0 = m*(x-x_0): # 1 mark |
| > | "So tangent becomes": eval(tangent, [x_0 = 1, y_0 = 1]);
isolate(%,y); # 1 mark |
| > | "10 marks total for Q4": |
| > | "Q5: Temperature of a chemical reaction is given by":
T := t -> 5.6 * exp(-0.4 * (t-2)^2) + 9.6: "where T is temp and t is time since reaction started": |
| > | "a": plot(T(t),t=0..10);
# 1 mark for showing approx max # 1 mark for right shape (eg curve always above 9.6) "A tip for doing this by hand, first draw -0.4(t-2)^2 on a graph then apply exp to all functional values, stretch the curve by 5.6 in a vertical direction, lastly shift the curve up by 9.6.": |
![[Plot]](images/ass1_mth101_2005_32.gif)
| > | "b: What is the maximum temperature?":
"(From plot, this appears to be at t = 2) Firstly, find derivative (1 mark), then solve equal to zero to get all critical points (1 mark), Sub into double derivative or inspect plot to show it is a max (1 mark), lastly, sub into T(t) to find max (1 mark)": D(T)(t); sol := solve(D(T)(t)=0,t); doub := D(D(T))(sol); is(doub < 0); maxT := T(sol); |
| > | "c: What is max rate of increase?":
"ie, what is the maximum value of dT/dt?, ie, where is it steepest? (Note from the plot above it appears about t = 1). Firstly, find double derivative (1 mark), then solve equal to zero (1 mark) Sub into triple derivative or inspect plot to show it is max (1 mark), lastly sub into D(T)(t) to find max rate of increase": # 1mark D(D(T))(t); solrate1,solrate2 := solve(D(D(T))(t),t); trip1 := D(D(D(T)))(solrate1); is(trip1 < 0); trip2 := D(D(D(T)))(solrate2); is(trip2 < 0); " "; maxRate := D(T)(solrate2); "at"; t = solrate2; |
| > | "Note in exact terms": solrate2 := 2 - sqrt(5)/2;
|
| > | "10 marks in total for Q5": |
| > | "Q6: Draw 4 curves, then calculate derivatives at":
pnt := x=0.2: y_1 := sin(x): y_2 := sin(x/2): y_3 := 3*sin(x): y_4 := sin(x+2): |
| > | "First draw y_1 (2 marks) as a wave with period 2*Pi going
through the origin and having amplitude 1": "Next draw y_2 (1 mark) based on y_1 stretched in a x direction by a factor of 2 (ie period now 2*Pi)": "Next draw y_3 (1 mark) based on y_1 stretched in a y direction by a factor of 3 (ie amplitude 3)": "Lastly draw y_4 (1 mark) based on y_1 shifted to left by 2 units": plot([y_1,y_2,y_3,y_4],x=-2*Pi..2*Pi,legend=["y_1","y_2","y_3","y_4"]); |
![[Plot]](images/ass1_mth101_2005_49.gif)
| > | "Next calculate derivatives at x = 0.2,
1 mark for each derivative, 1 mark for a comment that the derivatives match the plot": diff(y_1,x): eval(%,pnt); diff(y_2,x): eval(%,pnt); diff(y_3,x): eval(%,pnt); diff(y_4,x): eval(%,pnt); |
| > | "Notice from graph at x =0.2,
y_2 is flatter than y_1, while y_3 is steeper, on the other hand y_4 has negative slope with similar magnitude to y_2": |
| > | "10 marks total for Q6":
"60 marks total for whole assignment converted to a mark out of 10": |
| > |