Grade 12 / Algorithms 39 exercises (100% corrected)

a
1. Sequences: iterative loops E.5804 We consider the numerical se-quence v n defined by: v 0 = 1 ; v n +1 = 9 6 v n 1 We wish to write an algorithm displaying, for a given nat-ural number n , all the terms of the sequence, from rank 0 to rank n . Of the following three algorithms, only one is suitable. Specify which one, justifying the answer. Algorithme 1 Variables : v is a real. i and n are natural numbers Start algorithm : Read n v takes the value 1 For i ranging from 1 to n faire v takes the value 9 6 v End for Display v End algorithme Algorithme 2 Variables : v is a real. i and n are natural numbers Start algorithm : Read n For i from 1 to n faire v takes the value 1 v takes the value 9 6 v End for Display v End algorithme Algorithme 3 Variables : v is a real. i and n are natural numbers Start algorithm : Read n v takes the value 1 For i ranging from 1 to n faire Display v v takes the value 9 6 v End for Display v End algorithme 2 For n =10 , we get the following display: 1 1.800 2.143 2.333 2.455 2.538 2.600 2.647 2.684 2.714 For n =100 , we get the following display: 2.967 2.968 2.968 2.968 2.969 2.969 2.969 2.970 2.970 2.970 What conjectures can be made about the sequence v n ? E.5839 Consider the sequence u n de-fined by u 0 =1 and, for any natural number n : u n +1 = 2 · u n Consider the function f from an algorithm the argument n is a non-zero natural number: Function f(n) u 1 For i varying from 1 to n u 2 · u End of For Return u 1 Give an approximate value to 10 4 near the value re-turned by this function when called with the value n =3 as argument. 2 What interpretation can be given to the value returned by the function u ? 3 By several calls to the function f , we obtained the table below : n 1 5 10 15 20 Valeur renvoyée 1.4142 1.9571 1.9986 1.9999 1.9999 What conjectures can be made about the sequence u n ? E.6887 Consider the sequence defined by: u 0 = ln 2 ; u n +1 = 1 n + 1 u n 1 Below is presented a function f part of an algorithm: Function f(n) u ... For i varying from 1 to ... u ... End To Return u Copy and complete the code of the function f so that it returns the value of the term u n when called with the value n as argument. 2 Using the agorithm, we obtained the following table of values : n 0 1 2 3 4 5 10 50 100 u n 0.6931 0.3069 0.1931 0.1402 0.1098 0.0902 0.0475 0.0099 0.0050 What conjectures about the behavior of the sequence u n can be made? E.6891 Consider the following algorithm: Function f(p) u 5 For k varying from 1 to p u 0.5u+0.5 k 1 1.5 End of For Return u Call the function with parameter value p = 2 . Build a table with the values of the variables k , p and u dur-ing this call to the function f . What number is the output of the function call g ? E.5842 Consider the function f extracted from an algorithm the call is made by supplying an argument n integer of value greater than or equal to 1 : Function f(n) A 1 B 1 For K varying from 1 to n A A+ A 2 +B 2 3 B B 3 End To Resend A We call this function with the value 2 for the argument n . Copy and complete the table below containing the state of the variables during this call to the function f (we’ll round calculated values to 10 4 near) K A B 1 2 https://chingmath.fr chapExoCorrec/5804 sacados/5804 Extrait du bac Liban Mai 2013 chapExoCorrec/5839 sacados/5839 chapExoCorrec/6887 sacados/6887 Extrait Liban Mai 2017 chapExoCorrec/6891 sacados/6891 Extrait Antilles-Guyane Juin 2015 chapExoCorrec/5842 sacados/5842
2. Sequences: conditional loops to study E.5379 Consider the sequence u n de-fined by: u 0 = 5 ; u n +1 = u n ln u n for any integer n N The following algorithm is given : X 5 Y 0 As long as X>2.72 X X ln X Y Y+1 End As long as Using the following spreadsheet table, determine the value of the variable Y at the end of the algorithm’s execution. n 0 1 2 3 4 5 u n 5 3.1066746 2.7406525 2.7183726 2.71828183 2.7182818 E.5838 Consider the sequence p n de-fined by: p 1 = 0 ; p n +1 = 0.2 · p n + 0.04 for all We admit that the suite p n is increasing and converges to 0.05 . Consider the function f below from an algorithm the ar-gument k supplied on call is an integer greater than or equal to 2 : Function f(k) P 0 J 1 As long as P<0.05 10 k P 0.2 × P+0.04 J J+1 End As long as Return J 1 How to interpret the value returned by the function f relative to the value of the argument k supplied when calling this function? 2 Why are we sure that the call to the function f stops? E.6899 Let f be the function defined on 0 ; + by: f ( x ) = 2 x · e x We admit that the function f admits the limit: lim x ↦→ + f ( x )= 0 The following algorithm is given : t 3.5 p 0.25 C 0.21 As long as C>5 × 10 3 t t+p C f(t) End As long as Considering a step-by-step execution of the algorithm, com-plete the table below with the values taken by the variables p , t and C during its execution. Round values to the nearest 10 2 . Initialisation Etape 1 Etape 2 p 0.25 t 3.5 C 0.21 E.5836 We define the sequence d n by: d 0 = 1 ; d n +1 = 1 2 · d n 2 for all n N Consider the function f , derived from an algorithm, taking as argument p a strictly positive integer: Function f(p) d 1 n 0 As long as d>10 p d 0.5 · D 2 n n+1 End As long as Return n Calling the function f with the value 9 for the argument p , it returns the number 5 . Deduce the inequality verified by the number d 5 ? https://chingmath.fr chapExoCorrec/5379 sacados/5379 Extrait du bac Antilles-Guyane Septembre 2012 chapExoCorrec/5838 sacados/5838 chapExoCorrec/6899 sacados/6899 chapExoCorrec/5836 sacados/5836
E.6049 Let r n be a geometric sequence of reason 3 2 and first term 1 . Consider the function f of an algorithm: Function f(p) r 1 n 0 As long as r>p n n+1 R 3 2 · R End as long as Return n 1 What is the value returned by the function f called with the value 0.5 of the argument p ? 2 Called with the value 0.01 , the function f returns the value 33 . What does the value returned by this function represent? E.5837 Consider the sequence I n de-fined for n non-zero natural number by: I n = 1 0 x n · e x 2 d x We admit that the terms of the sequence I n which verifies the following relationship for any integer n , greater than or equal to 1 : I 1 = 1 2 · e 1 2 ; I n +2 = 1 2 · e n + 1 2 · I n Consider the following algorithm: At the end of the execution of the algorithm, to which term of the se-quence I n corresponds the value of the variable u ? n 1 u 1 2 e 1 2 As long as n<21 u 1 2 · e n +1 2 · u n n+2 3. Sequences: build conditional loops E.6894 A company produces bacteria for industry. In the laboratory, it has been measured that, in a suitable nutrient medium, the mass of these bacteria, mea-sured in grams, increases by 20 % in one day. The company sets up the following industrial device. In a tank of nutrient medium, 1 kg of bacteria are initially introduced. Then, at a fixed time each day, the nutrient medium contained in the tank is replaced. During this op-eration, 100 g of bacteria are lost. The company sets itself the target of producing 30 kg of bac-teria. The evolution of the bacteria population in the tank is mod-eled by the sequence u n defined as follows : u 0 = 1 000 ; u n +1 = 1.2 · u n 100 The company wants to know after how many days the bacte-ria mass will exceed 30 kg . The following algorithm can be used to answer the problem posed. Copy and complete this algorithm. u 1 000 n 0 As long as ... u ... n n+1 End As long as E.5803 The object of this exercise is the study of the sequence u n defined by its first term u 1 = 3 2 and the recurrence relation: u n +1 = n · u n + 1 2( n + 1) To calculate the term u 9 of the sequence, a student proposes the algorithm opposite the variable u will be assigned this value at the end of execution of this algorithm. He forgot to complete two lines : n 1 u 1.5 As long as n<9 u ... n ... End As long as 1 Copy and complete the two lines of the algorithm o where ellipses appear. 2 Running this algorithm step by step, we obtained the following results, rounded to the ten-thousandth : n 1 2 3 4 5 6 · · · 99 100 u n 1.5 0.625 0.375 0.2656 0.2063 0.1693 · · · 0.0102 0.0101 In view of these results, conjecture the direction of vari-ation and convergence of the sequence u n . https://chingmath.fr chapExoCorrec/6049 sacados/6049 chapExoCorrec/5837 sacados/5837 chapExoCorrec/6894 sacados/6894 Extrait d'Asie Juin 2015 chapExoCorrec/5803 sacados/5803
E.5998 Consider the sequence u n de-fined for any natural number n by the formula : u n = 2 · e 1 2 n ln 2 We admit that : The suite u n is strictly increasing on N The suite u n is convergent and converges to 2 . Copy the algorithm below and complete it with the process-ing and output instructions, so that at the end of execution, the variable n is assigned the smallest value of n such that u n > 1.999 . n 0 u 1 As long as ... ... ... End As long as E.5362 Consider the sequence u n de-fined by: u n = ln( n ) n for all n N We admit that : The sequence u n is strictly decreasing from the term of rank 2 . The sequence v n is convergent and converges to 0 . Write an algorithm determining the smallest integer n 0 greater than or equal to 2 such that u n 0 10 2 4. Sequences and loops E.5363 Consider the function f , taken from an algorithm, where the value passed as an argument is a natural integer. Function f(N) U 0 For k from 0 to N 1 U 3 · U 2k+3 End for Return U 1 What is the value returned by the function f when the value passed as an argument is N =3 ? 2 Consider the sequence u n defined by: u 0 = 0 ; u n +1 = 3 · u n 2 · n + 3 pour tout n N We admit that the sequence u n is increasing and ad-mits for limit: lim n ↦→ + u n = + Proposed a function f of an algorithm which, for a value p passed as an argument, returns the value of the small-est integer n 0 such that : For any n n 0 , we have : u n 10 p 5. Sum of the terms of a sequence E.5378 Let u n be the sequence defined for any strictly positive integer by: u n = 1 + 1 2 + 1 3 + · · · + 1 n ln n 1 Consider the function f below, taken from an algorithm and taking as argument n a strictly positive integer.: Function f(n) u 0 For i varying from 1 to n u u+ 1 i End To Resend u Give the exact value returned by this function when the user calls the function f with the value n =3 . 2 Recopy and complete the previous algorithm so that the value returned is the term u n of rank n when the function f is called with the value n . 3 Here are the results provided by the modified algorithm, rounded to 10 3 . n 4 5 6 7 8 9 10 100 1000 1500 2000 u n 0.697 0.674 0.658 0.647 0.638 0.632 0.626 0.582 0.578 0.578 0.577 Using this table, formulate conjectures about the direc-tion of variation of the sequence u n and its possible convergence. https://chingmath.fr chapExoCorrec/5998 sacados/5998 chapExoCorrec/5362 sacados/5362 chapExoCorrec/5363 sacados/5363 chapExoCorrec/5378 sacados/5378
E.6889 Let v n be the sequence defined by: v 1 = ln 2 ; v n +1 = ln 2 e v n pour tout n N We admit that this sequence is defined for any non-zero nat-ural number n . We then define the sequence S n for any non-zero natural number n by: S n = n k =1 v k = v 1 + v 2 + · · · + v n 1 Copy and complete the function f which returns the value of S n for a value of n passed as an argument : Function f(n) v ... S ... For k varying from ... to ... do ... ... ... ... End To Return S 2 By successive calls to this function, we obtain some val-ues of S n . Values rounded to the nearest tenth are given in the table below : n 10 100 1 000 10 000 100 000 1 000 000 S n 2.4 4.6 6.9 9.2 11.5 13.8 Explaining your approach, make a conjecture as to the behavior of the suite S n . E.6730 Consider the sequence A n whose terms are obtained by studying the successive values taken by the variable A during the step-by-step execution of this algo-rithm : Function f(n) A 0 For k ranging from 0 to n 1 A A+ 1 2 × sin 2 ı n × 1+ k n 1+ k+1 n End For We call the function f with the value 10 for the argument n . Copy and complete, rounding to the nearest thousandth, the table below illustrating how the algorithm works: k 0 1 2 3 4 5 6 A 0.323 0.711 1.170 1.705 2.322 3.027 3.826 k 7 8 9 A 4.726 6. Jointly defined sequences E.6000 Consider the two sequences x n and y n defined by: x 0 = 1 x n = 5 4 · x + 3 4 · y ; y 0 = 5 y n = 3 4 · x + 5 4 · y Consider the function f of an algorithm shown below. Call with an argument n integer greater than or equal to 1 , its execution returns the pair ( x n ; y n ) whose coordinates are the values of the terms of the sequences x n and y n of rank n . The function does not return the expected values. Modify the code of this function accordingly: Function f(n) x 1 y 5 For i ranging from 1 to n x 5 4 x+ 3 4 y y 3 4 x+ 5 4 y End To Return (x; y) E.6893 Consider two sequences of real numbers d n and a n defined by d 0 =300 , a 0 =450 and, for any natural number n 0 : d n +1 = 1 2 · d n + 100 a n +1 = 1 2 · d n + 1 2 · a n + 70 1 Calculate d 1 and a 1 . 2 We wish to write a function in an algorithm that will take as argument a natural integer n and return the pair of of values ( d n ; a n ) associated with rank n . The following function is proposed : Function f(n) D 300 A 450 For k varying from 1 to n D D 2 +100 A A 2 + D 2 +70 End for Renvoyer ( D ; A) a Which pair of numbers is returned by calling the func-tion f with the argument n =1 ? Are these results consistent with those obtained in question 1 ? b Correct this function so that it returns the desired re-sults. https://chingmath.fr chapExoCorrec/6889 sacados/6889 chapExoCorrec/6730 sacados/6730 chapExoCorrec/6000 sacados/6000 Extrait d'Asie Juin 2012 chapExoCorrec/6893 sacados/6893
KWUV012 E.5841 We define the sequences u n and v n on the set N of natural numbers by: u 0 = 0 ; v 0 = 1 ; u n +1 = u n + v n 2 v n +1 = u n + 2 · v n 3 , for any n N The aim of this exercise is to study the convergence of the sequences u n and v n . 1 Calculate u 1 and v 1 . 2 Consider the function f taken from an algorithm whose call is made with as argument passage an integer n greater than or equal to 1 : Function f(n) u 0 v 1 For k varying from 1 to n w takes the value u u w+v 2 v w+2 · v 3 End of For Renvoyer ( u ; v) a We call the function f with value 2 of the argument N . Copy and complete the table given below containing the state of the variables during the execution of the call to this function : k w u v 1 2 b For a given strictly positive number n , what does the pair of values ( u ; v) returned by the call to function f correspond to in relation to the situation studied in this exercise? E.5377 Consider the following algorithm: Input Enter a strictly positive non-zero real a . Enter a strictly positive non-zero real b ( b>a ) Enter a non-zero natural number N Initialization Assign to u the value a Assign to v the value b Assign to n the value 0 Processing AS : n<N Assign to n the value n +1 Assign to u the value a + b 2 Assign to v the value a 2 + b 2 2 Assign to a the value u Assign to b the value v . Output Display u , display v Reproduce and complete the following table, running this al-gorithm for a =4 , b =9 and N =2 . Successive values of u and v will be rounded to the thousandth. n a b u v 0 4 9 1 2 E.5853 Consider the function f extracted from an algorithm taking as argument the parameter n of strictly positive integer value. Function f(n) K 0 U 2 V 10 As long as K<n K K+1 W U U 2 · U+V 3 V W + 3 · V 4 End as long as Renvoyer ( U ; V) Call the function f with the value n =2 . Copy and complete the table given below, giving the val-ues successively taken by its variables when the function f is called. 7. Towards probabilities https://chingmath.fr chapExoCorrec/5841 sacados/5841 Extrait du Bac Antilles-Guyane Juin 2013 chapExoCorrec/5377 sacados/5377 Extrait du Bac Asie Juin 2012 chapExoCorrec/5853 sacados/5853 KWUV012
E.5364 Consider the algorithm: C 0 For i ranging from 1 to 9 A random integer value between 1 and 7 If A>5 Then C from C+1 End If End For In the random experiment simulated by the previous algo-rithm, we call X the random variable taking the value of variable C at the end of the algorithm’s execution. What law does the variable X follow? Specify its parameters. 8. Predicting how an algorithm works E.6895 Let m and m be two relative in-tegers. Consider the equation ( E ) defined by: m · m 4 2 + m 1 · m 1 + m · m 4 = 0 Consider the following algorithm: For m ranging from 10 to 10 For m ranging from 10 to 10 Si m · m 2 +16 · m 1 · m 1 +4 · m · m =0 Alors ( a ; b) (m ; m ) End If End of For End of For During step-by-step execution, we are interested in the values successively taken by the variables a and b . 1 What is the role of this algorithm? 2 When this algorithm is run, the pair ( a ; b) will be as-signed six pairs of integers, including : ( 4 ; 1) ; (0 ; 1) ; (5 ; 4) . Write the six pairs in the order of their successive assign-ment during the execution of the algorithm. E.6200 A patient is given a drug by intra-venous injection. The amount of drug in the blood decreases over time. At time 0 , a machine injects 10 m‘ of the drug. It is esti-mated that 20 % of the drug is eliminated per minute. When the amount of drug falls below 5 m‘ , the machine re-injects 4 m‘ of product. After 15 minutes, the machine is stopped. For any natural number n , note v n the amount of drug, in m‘ , remaining in the blood at minute n . Consider the algorithm below : v 10 For n ranging from 1 to 15 v 0.8 × V If v<5 Then v v+4 End If p v End For By running this program step by step and observing the val-ues taken by the variable p , we obtain the remaining quantity of medicine minute by minute. 1 Calculate the missing elements of the table below giv-ing, rounded to 10 2 and for n greater than or equal to 1 , the remaining minute-by-minute quantity of drug obtained with the algorithm. n 0 1 2 3 4 5 6 7 v n 10 8 6.4 8.15 n 8 9 10 11 12 13 14 15 v n 6.52 5.21 8.17 6.54 5.23 8.18 6.55 5.24 2 After 15 minutes, what total amount of medication has been injected into the body? 3 We want to program the machine to inject 2 m‘ product when the amount of drug in the blood is less than or equal to 6 m‘ and that it stops after 30 minutes. Recopy the previous algorithm, modifying it so that, through a step-by-step execution of the algorithm, the variable p takes as its value the amount of drug, in m‘ , remaining in the blood minute by minute with this new protocol. https://chingmath.fr chapExoCorrec/5364 sacados/5364 Extrait d'Antilles-Guyane Juin 2012 chapExoCorrec/6895 sacados/6895 chapExoCorrec/6200 sacados/6200
-112345678910-2-112O E.6001 Robot Tom has to cross a bridge without railings, 10 steps long and 2 steps wide. His gait is very distinctive : Either he takes one step straight ahead ; Or it moves diagonally to the left (movement equivalent to one step to the left and one step straight ahead) ; Or it moves diagonally to the right (movement equivalent to one step to the right and one step straight ahead) . These three types of displacement are assumed to be random and equiprobable. The aim of this exercise is to estimate the probability is to estimate the probability p of the event S ˇ Tom crosses the pont ı ; i.e. ˇ Tom has not fallen into the water and is still on the bridge at the end of 10 displacements ı. The bridge is represented by a rectangle in the plane with an orthonormal coordinate system O ; I ; J as shown in the figure below. Tom is assumed to be at the (0 ; 0) coordinate point at the start of the traverse. We note ( x ; y ) Tom’s coor-dinates after x displacements. The following algorithm has been written to simulate Tom’s position. At the end of its execution, the values of the vari-ables x and y represent Tom’s position at the end of his jour-ney : x 0 y 0 As long as (y 1) and (y 1) and (x 9) n value chosen at random between 1 , 0 and 1 y y+n x x+1 End as long as 1 The following couples are given : ( 1 ; 1) ; (10 ; 0) ; (2 ; 4) ; (10 ; 2) Which of these could be obtained with this algorithm? Justify your answer. 2 Modify this algorithm so that instead of ˇ Tom’s position is ( x ; y ) ı, it finally displays ˇ Tom has successfully crossed ı or ˇ Tom is tombé ı. E.5361 A group of 50 riders, wearing bibs numbered from 1 to 50 , takes part in a cycle race that in-cludes 10 stages, during which no retirements are recorded. At the end of each stage, a group of 5 riders is randomly se-lected for doping control. These designations of 5 riders at the end of each stage are independent. The same rider may therefore be tested at the end of several stages. 1 At the end of each stage, how many different groups of 5 riders can be formed? 2 Consider the algorithm below in which : ˇrand(1,50)ı yields a random integer belonging to the interval 1 ; 50 ; writing ˇ x := y ı designates the assignment of a value y to a variable x . a 0 b 0 c 0 d 0 e 0 As long as (a=b) or (a=c) or (a=d) or (a=e) or (b=c) or (b=d) or (b=e) or (c=d) or (c=e) or (d=e) a rand(1.50) b rand(1.50) c rand(1.50) d rand(1.50) e rand(1.50) End As long as We are interested in the set composed of 5 natural inte-gers formed by the values of the variables a , b , c , d , e obtained at the end of the algorithm execution. a Which of the following sets of numbers could be ob-tained using this algorithm: L 1 = 2 ; 11 ; 44 ; 2 ; 15 ; L 2 = 8 ; 17 ; 41 ; 34 ; 6 L 3 = 12 ; 17 ; 23 ; 17 ; 50 ; L 4 = 45 ; 19 ; 43 ; 21 ; 18 b What can this algorithm do about the bike race? E.5939 Here’s an algorithm for three-digit integers where the hundreds digit is not equal to the units digit: Step 1 : Invert digit order (e.g. 275 becomes 572) Step 2 : Calculate the difference between the larger and smaller of these two numbers. Step 3 : Reiterate step 1 on the number obtained. Step 4 : Adding these last two nombres 1 a Apply the algorithm to numbers 123 , 448 and 946 . b What can we conjecture? 2 To implement this algorithm, the 2 step, implicit when performing ˇ calculations at mainı , requires dissociation of the integer entered to isolate the units digit, the tens digit and then the hundreds digit. Complete the following function, from an algorithm, whose role is to take as argument an integer n of three digits and perform this dissociation. In this algorithm a is the hundreds digit, b the tens digit and c the units digit of the number n we wish to decompose. Function f(n) a 0 b 0 c 0 As long as n 100 a a+1 n n 100 End As long as As long as n ...... b ...... ...... ...... End As long as c value ...... Renvoyer ( a ; b ; c) https://chingmath.fr chapExoCorrec/6001 sacados/6001 Antilles-Guyane Septembre 2013 -112345678910-2-112O chapExoCorrec/5361 sacados/5361 chapExoCorrec/5939 sacados/5939
--xVariationdef 9. Using the calculator E.6897 Let f be the function defined on R by: f ( x )= x ln x 2 +1 We admit that the function f admits the following table of variations : Consider the following algorithm: Function g(A) N 0 As long as N ln N 2 +1 <A N N+1 End As long as Return N the function g is called with an argument A which is a real number. 1 What meaning do we give to the value returned by the function g ? 2 Determine the value N returned by calling the function g is performed with the value 100 of its parameter A . E.6896 Say whether the statement below is true or false, and justify your answer. Let f be the function defined on R by: f ( x )= 3 4+6 · e 2 x At the end of execution, this algorithm assigns the value tothevariable X 0.54 . X 0 Y 3 10 While Y<0.5 X X+0.01 Y 3 4+6 · e 2X Fin As long as E.6888 Consider the sequence u n de-fined by: u 0 = 0.02 ; u n +1 = e 2 · u n e u n pour tout n N We admit that the sequence u n is increasing and has limit: lim n ↦→ + u n = + The function f in the following algorithm aims to return the smallest integer n such that u n >M , M is a positive real passed as a parameter when calling f . This algorithm is in-complete : Function f(M) u 0.02 n 0 As long as ... ... ... End as long as Return n 1 Copy the part ˇ Treatment ı completing it. 2 Using the calculator, determine the value returned by the function f when called with the argument M =60 . 10. Around the dichotomy E.6890 Consider the following algorithm: Function f(x) Return .... Function g(a,b) As long as b a>0.3 x a + b 2 If f(x) · f(a)>0 then a x otherwise b x End If End As long as Renvoyer a + b 2 Indicate whether the statement below is true or false and jus-tify the answer. On complete the algorithm so that the function f can return the images of the parameter x for the function : f ( x )= x 3 3 . A call is made to the function g with the parameter values a=1 and b=2 . The value returned by this call to the g function is the num-ber 1.6875 https://chingmath.fr chapExoCorrec/6897 sacados/6897 --xVariationdef chapExoCorrec/6896 sacados/6896 Extrait de Liban Mai 2016 chapExoCorrec/6888 sacados/6888 chapExoCorrec/6890 sacados/6890 Extrait d'Asie Juin 2015
Cf01 E.6898 Consider the function f defined on 0 ; 5 by: f ( x ) = e x 1 Assume that the function f is strictly increasing and note m the value e 5 1 . Consider the following algorithm: a 2 b 2e As long as b a>10 3 c (a+b)=2 If f(c)<3.5 Then a c Otherwise b c End If End As long as d f(c) Interpret the value of the variable d at the end of the algo-rithm execution. E.5843 Consider the function f defined on 0 ; + by: f ( x ) = 2 x + 2 · ln x x The following algorithm is given : a 0 b 1 As long as b a>0.1 m 1 2 (a+b) If f(m)<1 Then a m Otherwise b m End If End As long as Run this algorithm, filling in the table with the values taken by the variables successively during its execution : stage 1 stage 2 stage 3 stage 4 étape 5 a 0 b 1 b-a m 11. Around the integrals E.5999 Consider a function f decreasing on the interval 0 ; 1 . Note C the representative curve of the function f in an or-thogonal reference frame. Note D the area between the x-axis, the curve C and the straight lines with equations x =0 and x =1 . 1 An approximation of the area of the domain D is repre-sented below using the four rectangles below : Complete the algorithm below so that the value of the variable S , at the end of execution of the algorithm, is the area formed by the four rectangles : S 0 For k varying from 0 to ... S ... End For 2 In this question, N is an integer strictly greater than 1 . We cut the interval 0 ; 1 into N intervals of equal length. On each of the intervals, a rectangle is constructed in the same way as in the previous question. Modify the previous algorithm so that the value of the variable S at the end of the algorithm’s execution is the sum of the areas of the N rectangles thus constructed. https://chingmath.fr chapExoCorrec/6898 sacados/6898 chapExoCorrec/5843 sacados/5843 chapExoCorrec/5999 sacados/5999 Cf01
0,250,50,75I0,250,5OCf vantaildedroitevantaildegauchepilierdroitpiliergauche 00.511.522.50.511.5La distance entre le bas du portail et le sol est de0;05mCf E.6916 Let f be a function defining the interval 0 ; 1 by: f ( x ) = x e x x and whose representative curve C f is given below : We admit that the function f is positive on the interval 0 ; 1 . We define in an algorithm the function g in which the vari-ables are: K and i natural numbers, K being non-zero ; A , x and h real numbers. Function g(K) A 0 x 0 h 1 K For i varying from 1 to K A A+h × f(x) x x+h End for Return A 1 Reproduce and complete the table below, indicating the values of the variables A and x when the function g is executed step by step. Successive values of A will be rounded to the nearest thou-sandth. i A x 1 2 3 4 2 Illustrating this on the graphical representation above, give a graphical interpretation of the value returned by the function g when the argument passed has the value K=8 . 3 What can be said about the value returned by the func-tion g when K becomes large? E.6270 We want to make a gate as shown below. Each leaf measures 2 meters wide, the width of each board is 0.2 m and the ground clearance of each leaf is 0.05 m : Here’s an enlarged view of the right leaf : The position of the upper-left corners of each board is mod-eled by the curve C f representative of a function f defined by: f ( x ) = x + 3 8 · e 4 x + 5 4 1 We number the ten boards from left to right, starting with 0 . Consider board k k is an integer between 0 and 9 : a For plate number k , give the value of the abscissa of its upper-left point. b Give the area of board number k . 2 Copy and complete the following algorithm so that, at the end of its execution, the total area of the boards used for the right leaf is the value of the variable S . S 0 For K ranging from 1 to 9 S S+... End of For https://chingmath.fr chapExoCorrec/6916 sacados/6916 0,250,50,75I0,250,5OCf chapExoCorrec/6270 sacados/6270 vantaildedroitevantaildegauchepilierdroitpiliergauche 00.511.522.50.511.5La distance entre le bas du portail et le sol est de0;05mCf