The box shown on the rough ramp above is sliding up the ramp. calculate the acceleration of the box

We are given that a block is sliding up an incline. A diagram of the situation is given as follows:
To determine the acceleration we will add the forces parallel to the ramp, we will call this direction the x-direction:
[tex]\Sigma F_x=-mg_x-F_f[/tex]Where:
[tex]\begin{gathered} m=\text{ mass} \\ g=\text{ acceleration of gravity} \\ mg_{}=\text{ weight} \\ mg_x=\text{x-component of the} \\ F_f=\text{ force of friction} \end{gathered}[/tex]Now we determine the x-component of the weight by using the trigonometric function sine:
[tex]\sin 40=\frac{mg_x}{mg}[/tex]Now we multiply both sides by "mg":
[tex]mg\sin 40=mg_x[/tex]Now we substitute this value in the sum of forces:
[tex]\Sigma F_x=-mg_{}\sin 40-F_f[/tex]Now, to determine the force of friction we will use the following formula:
[tex]F_f=\mu N[/tex]Where:
[tex]N=\text{ normal force}[/tex]To determine the normal force we add the forces in the direction perpendicular to the ramp, we will call this direction the y-direction:
[tex]\Sigma F_y=N-mg_y[/tex]Where:
[tex]mg_y=y-\text{component of the weight}[/tex]Now, since there is no movement in the y-direction, the sum of forces is equal to zero:
[tex]N-mg_y=0[/tex]Now we solve for the normal force:
[tex]N=mg_y[/tex]Now we calculate the y-component of the weight using the trigonometric function cosine:
[tex]N=mg\cos 40[/tex]Now we substitute this value in the expression for the friction force:
[tex]F_f=\mu mg\cos 40[/tex]Now we substitute this value in the sum of forces in the x-direction:
[tex]\Sigma F_x=-mg_{}\sin 40-\mu mg\cos 40[/tex]Now, since the sum of forces is equivalent to the product of the mass by the acceleration we have:
[tex]-mg_{}\sin 40-\mu mg\cos 40=ma[/tex]We can take "-mg" as a common factor on the left side:
[tex]-mg(_{}\sin 40+\mu\cos 40)=ma[/tex]We can cancel out the mass:
[tex]-g(_{}\sin 40+\mu\cos 40)=a[/tex]Now we substitue the values:
[tex]-(9.8\frac{m}{s^2})(\sin 40+0.2\cos 40)=a[/tex]Now we solve the operations:
[tex]-7.8\frac{m}{s^2}=a[/tex]Therefore, the acceleration is -7.8 meters per second squared.