# How do you transform y=1/x to y= (3x-2)/(x+1) ?

## The answer says it's a reflection in the x-axis, stretching by a scale factor of 5 and translate it by (-1.3) but how do I do it?

Aug 5, 2018

That's an interesting question! I've never done something like it before, but I've figured out how to do it.

A typical transformation of a function $y = f \left(x\right)$ takes the form

$y = a f \left[b \left(x - c\right)\right] + d$

where

• $a$ stretches/squishes the function up and down,
• $b$ stretches/squishes the function left to right,
• $c$ shifts the function left to right, and
• $d$ shifts the function up and down.

In this form, a change in any of $a , b , c , d$ corresponds directly to a change in the function by that same amount. (For example, increasing $c$ by 1 always means the function shifts to the right by 1.)

Thus, if we can write a given "final transformation" in this form, we can extract the stretches and shifts from it directly. That's what we'll try to do.

For the function $y = \frac{1}{x}$, the generic transformation form is

$y = \frac{a}{b \left(x - c\right)} + d$

Can we write $y = \frac{3 x - 2}{x + 1}$ in this form?

Yes we can!

The first (and hardest) thing to do is to express the numerator is a way that uses $x + 1$ in place of $x$. To do this, add and subtract 1 to $x$, like this:

$y = \frac{3 \left(x + \textcolor{b l u e}{1} - \textcolor{red}{1}\right) - 2}{x + 1}$

$\textcolor{w h i t e}{y} = \frac{3 \left(x + \textcolor{b l u e}{1}\right) - \textcolor{red}{3} - 2}{x + 1}$

$\textcolor{w h i t e}{y} = \frac{3 \left(x + 1\right) - 5}{x + 1}$

Why did we do that? Because, when we split the function into two fractions, like this:

$y = \frac{3 \left(x + 1\right)}{x + 1} - \frac{5}{x + 1}$

the first fraction has a cancellation we can do:

$y = \frac{3 \cancel{\left(x + 1\right)}}{\cancel{x + 1}} - \frac{5}{x + 1}$

$\textcolor{w h i t e}{y} = 3 - \frac{5}{x + 1}$

And now, if we reorder the tems, we get

$y = \frac{- 5}{x + 1} + 3$

And hey, look—this is the form we were aiming for! This form tells us:

a=–5
$b = 1$
c=–1
$d = 3$

In other words, to translate $y = \frac{1}{x}$ into $y = \frac{3 x - 2}{x + 1} ,$ we stretch the function up/down by –5 (i.e. reflect it about the $x$-axis and then stretch that by 5), shift it left by 1 (i.e. right by –1), and shift it up by 3.

(Since $b = 1$, there is no left-to-right stretch or squish.)

• reflect around the $x$-axis,
• translate by (–1, 3).