Artificial intelligent assistant

Confused in using the salvage value in Rate of Return. I am trying to solve a rate of return question from the book Engineering Economics by R. Paneerselvam. In that particular problem I am given a salvage value along with other factors. Following are the factors: i) Initial cost ii) Annual incremental revenue iii) Life iv) Life-end Salvage value (Rs.) Now when salvage value is not given we use the following formula: $PW_n(i) = -P + A(P/A,i,n)$ Now how will this formula be modified when salvage value is also added? I mean what factor will be introduced alongside the Salvage value?

To obtain the present value of the salvage value ($S$) you discount the value of the salvage $n$ times. Therefore the whole formula is

$$PV_n(i)=-P+A\cdot \frac{(1+i)^n-1}{i\cdot (1+i)^n}+\frac{S}{(1+i)^n}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 490b4e9294ee8d277caf62fe29551e03