0% found this document useful (0 votes)
339 views5 pages

Assignment MAT421

The document defines two piecewise functions: f(x) which is discontinuous at x=1, and f(x) which has a vertical asymptote at x=-3 and horizontal asymptotes at y=1 and y=-1. It evaluates the functions at various values, finds limits, intercepts, asymptotes, critical points, and inflection points. Plots of both functions are displayed.

Uploaded by

2023269284
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
339 views5 pages

Assignment MAT421

The document defines two piecewise functions: f(x) which is discontinuous at x=1, and f(x) which has a vertical asymptote at x=-3 and horizontal asymptotes at y=1 and y=-1. It evaluates the functions at various values, finds limits, intercepts, asymptotes, critical points, and inflection points. Plots of both functions are displayed.

Uploaded by

2023269284
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

> # Name : NURUL NAJIHAH BINTI NURZAL

> # Group : N4CS2411M1


> # Student ID : 2023269284
> restart;
>
> #Question 1
> # a) display the piecewise function
> f := x -> piecewise(x<1,x^2-3,x>=1,-3*x+5);

> f(x) := piecewise(x<1,x^2-3,x>=1,-3*x+5);

> # b) Evaluate f(1)


> f(1);

> # c) Determine limit


> limit(f(x),x=1, left);

> limit(f(x),x=1, right);

> limit(f(x),x=1);

> # d) No
> # e) f(x) is discontinuous at x=1

> plot(f(x));
>
>
> # Question 2;
> f := x -> -(3-x)/(x+3);

> # a) x-intercept and y-intercept


> # x-intercept
> solve(f(x)=0);

> # y-intercept
> f(0);

> # b) vertical and horizontal asymptote


> # vertical asymptote
> denom(f(x));

> solve(%);

> # vertical asymptote x=-3


> # horizontal asymptote
> limit(f(x),x=%,left);

> limit(f(x),x=%%,right);

> # vertical asymptote x=-3


> # horizontal asymptote
> limit(f(x),x=infinity);

> limit(f(x),x=-infinity);
> # horizontal asymptote y=1
> # c) critical point(s)
> Df:=D(f);

> simplify(1/(x+3)+(3-x)/(x+3)^2);

> solve(%);
> # no critical point
> # d) no extrema point.
> # e) inflection point
> DDF:=D(D(f));

> simplify(-2/(x+3)^2-(2*(3-x))/(x+3)^3);

> solve(%);
> # no inflection point.
> plot(f(x));

You might also like