This economics post goes over the tricky problem of determining the change in equilibrium price and quantity after a shift occurs. This changes both the supply and demand function. The trick is to know how to enter the shift into the supply and demand equations. Generally you need to solve the functions for quantity (Q) and change the intercept.

The question in this post is:

Assuming
Pd = 250 - 0.5Q and Ps = 100 + 0.25Q, then

What
if quantity demanded at every price level increases by 10 and quantity supplied
also rises by 5 at every price level?

First we can confirm equilibrium price and quantity by
setting Pd equal to Ps and solving for Q.

Pd = Ps = 250 – 0.5Q = 100 + 0.25Q

If we add 0.5Q to both sides and subtract 100 from both sides
we get:

0.75Q = 150 now we divide both sides by .75 to get:

Q = 200 and we can plug this into either our Ps or Pd
equation to confirm that equilibrium price is indeed 150.

The next part of this question shifts the demand and supply
curves by the given amounts. Note that
this is a change in the intercept and therefore a SHIFT in the curves. Nothing has changed the slopes of the
curves. To add this change to our
original equations we change the intercept values, but first we should change
the equations to be true demand and supply functions.

To do this we need to solve both functions for Q instead of
P. To do this for the demand function we
add 0.5Q to both sides, subtract P from both sides, and multiply both sides by
2 to get:

Q = 500 – 2P

For the supply function, we need to subtract 50 from both
sides and multiply both sides by 4 to get:

Q = -400 + 4P

Now we can just make the associated changes to the
intercepts, which is adding 10 to the intercept of the demand function to get 510 (500 + 10) and 5 to the supply function to get -395 (-400+5).

We now set these new supply and demand functions equal to
each other and solve for P to find our new equilibrium price:

Qd = Qs = 510 – 2P = -395 + 4P

So we must add 2P and 395 to both sides to get:

905 = 6P Now we
divide both sides by 6 to get:

P = 150.833

We can plug this new equilibrium price into our demand and
supply functions, and we will get an equilibrium quantity of 208.333 (which is
the same whether we plug it into our demand or supply function so we know we
did it right).

This means that both equilibrium price and equilibrium
quantity have gone up as a result of the shifts. It makes sense to see the equilibrium
quantity go up because both consumers and suppliers had a positive shift (an
increase in both supply and demand).
However, an increase in both supply and demand leaves the change in
price ambiguous, but by solving for the new equilibrium price we see that it
has gone up. This should make sense
because the relative magnitude of the shift in the demand curve was greater
than the shift in supply. Since the
shift in demand has a positive impact on price and the shift in supply a
negative, we would expect the positive force to dominate and we have confirmed
this by seeing the increase in equilibrium price.