# How do I write a log function that intersects the axis at particular points?

I'm trying to write a log function that intersects both the x and y axis at 100.

Through trial and error I have come up with this function, which is close to what I want. It appears to intersect the x axis at 99, and the y axis at 100.

$y=-50\log(x+B)+C$

I notice that for a function like:

$y=A\log(x+B)+C$

• A controls the slope
• B shifts horizontally
• C shifts vertically

I'd like to learn how to write a log function like this such that the intersections of the axis are whatever arbitrary points I choose.

Thank you!

-

I'm not sure what you mean by $A^*-\log(x+B)+C$ - it's the $^*-$ that puzzles me. I'll assume you just mean $y=A\log(x+B)+C$.
So say you want the graph to intersect the $x$-axis at $r$ and the $y$-axis at $s$. That means you want $s=A\log B+C$ and $0=A\log(r+B)+C$. That's two equations in three unknowns, so there will be lots of solutions. You could even insist on, say, $B=1$. Then the 1st equation tells you $C=s$, and the second becomes $0=A\log(r+1)+s$, which says $A=-s/\log(r+1)$. So as long as $r\ge-1$ one answer to your problem is $y=-{s\over\log(r+1)}\log(x+1)+s$.