Defining a function that can take one OR two arguments. This is a two part question:
1) Let's define a recursive function as so:
$$f(x,y)=
\begin{cases} 
\hfill f(x,5)   \hfill & y\le0 \\
\hfill 0 \hfill & y=1\\
\hfill x+f(x,y-1) \hfill & y>1 \\
\end{cases}\text{   (Multiplies x by 4)}$$
Is is possible to call it with only the $x$ argument? Or in other words, when I call it with only one variable ($f(x)$), is there a way to specify that $$f(x)\text{[one argument]}=f(x,0)\text{[second argument assumed to be 0 when only first is present]}$$
2) If possible, how do I express this? 
Also, in some programming languages, such a notation looks like this: 
def function(x,y=0): (defining a default value for y)
 A: In mathematics, a function must have a domain $D$, and $f(d)$ must be uniquely defined for each $d\in D$. It’s common for mathematicians to be sloppy with notation and write $f(x,y)$ for $f((x,y))$, but the phrase “function of two variables” is a bit of a misnomer, and to be clearest in a situation like this, let’s write $f((x,y))$ when $f$’s argument is the (single) value $(x,y)$ in $\mathbb{R}^2$.
You want to define a function $f$ on the domain $D={\mathbb R}^2\cup {\mathbb R}$. There’s nothing wrong with doing that, and here’s a definition that matches yours.
$f(d)=
\begin{cases}
\hfill f((z,0)) \hfill & \mbox{when } d=z\in{\mathbb R}\\
\hfill f((x,5))   \hfill & \mbox{when } d=(x,y)\in{\mathbb R}^2 \mbox{ and }y\le0\\
\hfill 0 \hfill & \mbox{when } d=(x,y)\in{\mathbb R}^2 \mbox{ and }y=1\\
\hfill x+f((x,y-1)) \hfill & \mbox{when } d=(x,y)\in{\mathbb R}^2 \mbox{ and }y>1 \\
\end{cases}
$
Here, $f(d)$ is uniquely defined for each $d$ in the domain. If $d\in\mathbb{R}$, $f(d)$ is defined as $f(d')$ for a value $d'\in\mathbb{R}^2$, and when $d\in\mathbb{R}^2$, $f(d)$ is well-defined because each $d={\mathbb R}^2$ has a unique representation $d=(x,y)$ and $f(d)$ is either defined non-recursively (when $d\in\mathbb{R}^2$ and $d\notin(0,1)$) or recursively in a way that terminates in finitely many steps.
(For what it’s worth, mathematicians frequently view $\mathbb{R}$ as a subset of $\mathbb{R}^2$ by identifying $x\in\mathbb{R}$ with $(x,0)\in\mathbb{R}^2$, but I’m avoiding that convention and considering $\mathbb{R}$ and $\mathbb{R}^2$ as disjoint sets, which is useful to do here.)
