an =(5 − 77 sin(n) + 8n^2)/(1 − 4n^2), L=-2 For ε =1/500, use Maple to find the smallest N such that |aN − L| < ε.
which command should I use? I have tried that: an:=(5 − 77 sin(n) + 8n^2)/(1 − 4n^2) solve(an+2=1/500) and this came out a really weird answer which said root of blabla.. or I have tried minimize(an+2) and it seems wrong too..
I'm guessing that you intend for n to be a positive integer. If not then please give additional details.
Also, why do you mention both N
and n
? If you mean fully the same thing by both then it's not helpful to use both in your description.
One way to go about this is to find a value for n
above which the inequality is always true. Once you know that then (if it's not huge) you can just test the positive integers below it. The answer will be 1 more than the first (of the descending values) to fail the check.
This is certainly not the only way to accomplish this in Maple.
an := (5-77*sin(n)+8*n^2)/(1-4*n^2):
L := -2:
eps := 1/500:
It seems that the solve
command cannot handle the sin(n)
, so we'll replace that term by a dummy name K
on which we'll place the restriction -1<=K<=1
.
Q := [solve( { subs(sin(n)=K,abs(an-L)<eps), K<=1, K>=-1, n>=1 } )]:
You can look at Q
if you want. If we only need a bound then we can be rough and ready about yanking out inequalities involving n
. Another way to go about all this is to split into two cases by the signum of an-L
, then to replace sin(n)
by the appropriate worst case value, and then to solve the two simpler inequalities for n
. (You could do that by hand for this problem.)
R := [solve( indets(Q,{identical(n)>anything}) )];
[ /1 (1/2) \ ]
R := [{ - 42001 < n }]
[ \2 / ]
upper := floor(lhs( R[1,1] ));
upper := 102
Now we know a value for n above which the inequality must hold. A quick loop over descending values of n
tells us where the largest (integer) value of n
violates the inequality. The answer should be 1 more than that.
for i from upper to 1 by -1 do
if not is( eval(abs(an-L)<eps, n=i) ) then
ans := i+1;
i := 1; next;
end if;
end do;
ans;
100
And, while a plot is no proof we can look at a plot to get a better idea of what was going on.