We will contibue our discussion with exponentials and logs by learning how to solve equations with these entities.
We will first look at how to solve exponential equations. Before we begin, lets recall a property about exponents from the last session:
\[ if\\ b^x=b^y\\ then\\ x=y \]
Using the above property, lets jump into some examples
\[ 5^{3x}=5^{7x-2} \]
We know that the base is equal on both sides of this equation,hence we can use the property to set the exponents of each side equal to each other as shown below. From here, you just solve the equation as any ordinary solve for x type problem.
\[ 3x=7x-2\\ -4x=-2\\ x=\frac{-2}{-4}=\frac{1}{2} \]
Not every problem will be this straight forward,lets examine a more difficult example and see how sometimes it will be required to do some re-writing of the base in order to use the property highlighted at the start of this session.
\[ 4^{5-9x}=\frac{1}{8^{x-2}}\\ \]
The bases in this equation are not the same but if we do some critical thinking, we can see that both 4 and 8 can be reduced to factors of two. In other words, 2 raised to the second power is 4 and 2 raised to the third power is 8. This will allow us to write both sides of the equation in terms of equal bases. The other issue we need to deal with is the fact that the right hand side is a fraction. We did see a property that allows us to re-write fractions using a negative exponent.
\[ 2^{2(5-9x)}=\frac{1}{2^{3(x-2)}} \] I simply re-wrote the 4 and 8 in terms of base 2 to make them the same. Within each exponent, I will distribute the power I pulled out. I will also make the exponent of the right hand side negative so I can get rid of the fraction.
$$ 2{10-18x}=\ 2{10-18x}=2{-(3x-6)}\ 2{10-18x}=2^{-3x+6}
$$ We finally have the left hand sidebase equal to the right hand side base. We can apply the property and set the exponents equal to each other to solve for x.
\[ 10-18x=-3x+6\\ 4=15x\\ \frac{4}{15}=x \]
Here are your practice problems for this section: https://github.com/vindication09/Data-Science-Mathematics/blob/master/Alg_SolveExpEqns_Assignment.pdf
Lets recall a property we went over last session:
\[ if\\ lob_bx=lob_by\\ then\\ x=y \] Lets also introduce some critical properties of the log that we are going to use often to solve problems.
\[ 1. \log_b1=0\\ 2. \log_bb=1\\ 3. \log_bb^x=x\\ 4. \ b^{log_bx}=x\\ 5. \log_b(xy)=log_bx+log_by\\ 6. \log_b(\frac{x}{y})=log_bx-log_by\\ 7. \log_bx^r=rlog_bx\\ \]
Lets jump into an example:
We are going to use property 7 to re-write the left hand side. We will then have the form where log b on the right and the left are equal, hence we can use our main property to set the contents inside the log equal to each other and then solve for x.
\[ 2log_9(\sqrt x)=log_9(6x-1)\\ log_9(\sqrt x)^2=log_9(6x-1)\\ (\sqrt x)^2=6x-1\\ x=6x-1\\ -5x=-1\\ x=\frac{1}{5} \] The log propeties also hold for the natural log ln as shown below. We will use property 6. If we have ln on both sides, then the base is the same on both sides. It is the number e. We will then needto dig back deeper and solve the resulting polynomial.
\[ ln10-ln(7-x)=lnx\\ ln(\frac{10}{7-x})=lnx\\ \frac{10}{7-x}=x\\ 10=x(7-x)\\ 10=7x-x^2\\ x^2-7x+10=0\\ (x-5)(x-2)=0\\ x=5 \ x=2 \]
Here are your practice problems for this section:
logs and exponents give us the mathematical framework to solve real world problems in finance, probability, bio, and economics etc.
Lets look at some very basic applications and how to interpret a problem into mathematical language
Compound Interest This first application is compounding interest and there are actually two separate formulas that we’ll be looking at here. Let’s first get those out of the way.
If we were to put P dollars into an account that earns interest at a rate of r (written as a decimal) for t years (yes, it must be years) compounded m times, then the amount of dollars after t years is…
\[ A=P(1+\frac{r}{m})^{tm} \]
if interest is compounded continuously then the amount of dollars after t years is…
\[ A=Pe^{rt} \]
We are going to invest $100,000 in an account that earns interest at a rate of 7.5% for 54 months. Determine how much money will be in the account if interest is compounded quarterly?
From reading this problem, we need to identify our variables. Our prinicpal amount P is 100,000 and our rate as a decimal r is .075. Our time t is 54 but what about m? We are told the interest is compounded quarterly so m is 4. We plug all these numbers into our equation to find the amount of money in our account after t years.
We are given that t is 54 months but t has to be in unit years, so we divide 54/12 to get 4.5 years
\[ A=P(1+\frac{r}{m})^{tm}=100000(1+\frac{0.075}{4})^{(4.5)(4)}=139706.686207=139 , 706.69 \]
Just a note, if we compound every quarter, then m is 4. If we compund monthly then m is 12.
Now lets see the same problem but how different it would be if we compounded continously.
$$ A=Pe{rt}=100000e{(0.075)(4.5)}=140 , 300.00
$$
We could also solve for any of the variables such as time for example.
We are going to put 2500 into an account that earns interest at a rate of 12%. If we want to have $4000 in the account when we close it how long should we keep the money in the account if interest is compounded continously.
We want to solve this for t, so before plugging in numbers, I am going to manipulate the compounding continous formula to express t in terms of the other variables. I will have to use our log properties to manipulate this expression to get t alone.
\[ A=Pe^{rt}\\ \frac{A}{P}=\frac{Pe^{rt}}{P}\\ \frac{A}{P}=e^{rt}\\ ln(\frac{A}{P})=lne^{rt}\\ ln(\frac{A}{P})=rt\\ \frac{ln(\frac{A}{P})}{r}=t\\ \frac{ln(\frac{4000}{2500})}{0.12}=t\\ 3.917=t \]
Here are your practice problems for this section: