Recall that the general formula of a cosine function is of the form
![A\cdot\cos (Bx-C)+D](https://img.qammunity.org/2023/formulas/mathematics/college/6a4qe65q3kanrtmoh5qu0cv04wygpoz4ux.png)
where A is the amplitude, D is the midline, the number C/B is the phase shift and the number 2*pi/B is the period.
We are told that A=3 and D=5. Also, we are told that the period is pi/2. Since we don't have any information regarding the phase shift, we will asume that the phase shift is 0. Then we have the following equations:
![(C)/(B)=0](https://img.qammunity.org/2023/formulas/mathematics/college/yo5mysd0rkhnix3tgqx95gr9o22wfck62f.png)
and
![(2\cdot\pi)/(B)=(\pi)/(2)](https://img.qammunity.org/2023/formulas/mathematics/college/w4ub02sz44fllxvn70pqbiyobj8s1kxi1b.png)
From the first equation we deduce that C should be zero. From the second equation by multiplying by B on both sides and dividing by pi on both sides, we get
![2=(B)/(2)](https://img.qammunity.org/2023/formulas/mathematics/college/1tviiais0dp6q7664dzzthc1onh2b9jr67.png)
If we multiply by 2 on both sides, we get
![B=2\cdot2=4](https://img.qammunity.org/2023/formulas/mathematics/college/ugd8tyvly8org18jz1c2boaek4dsupknf9.png)
so gathering our previous results, we get the formula
![3\cos (4x)+5](https://img.qammunity.org/2023/formulas/mathematics/college/cr3m5uymaocfp1s54pziwrx66kjiqwp277.png)