General forms of Harmonic functions I wish to find the harmonic functions, $u(x,y)$, of the following form $$u(x,y) = \phi(\frac{x}{y})$$ and $$u(x,y) = \phi(\frac{x^2+y^2}{x^2})$$
where $\phi$ is a certain real-valued unknown function. How do I go about finding this harmonic function if I am given no specific function to work with?
I know that a function is harmonic if it has continuous second partials and that it satisfies the Laplace equation in it's domain. 
So, i'm looking for a function $\phi(\frac{x}{y})$ which satisfies that property.
 A: Recall that from writing out $u_{xx} + u_{yy} = 0$, we obtain a Differential Equation of the form which Srinivas K found. i.e., $(2t-2)t\phi''(t) + (2t-2)\phi'(t) = 0$ where $t = \frac{x^2+y^2}{x^2}$. We transform this equation first by dividing through by $(2t-2)t$ and then making the substitution $\phi'(t) = y(t)$. Then we have $$y'(t) + \frac{3t-2}{2t-2}y(t) = 0$$
$$\frac{dy}{dt} = -\frac{3t-2}{2t-2}y(t)$$
$$\implies \frac{1}{y(t)}dy = -\frac{3t-2}{2t-2}dt$$
Integrating both sides...
$$\ln(y(t)) = \int \frac{-(3t -2)}{(2t-2)t}dt$$
Partial Fraction Decomposition of the integrand...
$$\frac{-3t+2}{(2t-2)} = \frac{A}{t} + \frac{B}{2t-2}$$
$$\implies \; -3t + 2 = t(2A + B) - 2A$$
$$\implies A = -1 \implies B = -1$$
Hence, we have that 
$$\ln(y(t)) = \int \left ( \frac{-1}{t} + \frac{-1}{2t-2}\right )dt = -\int\frac{1}{t}dt - \frac{1}{2t-2}dt $$
Then by u-substiution where $u = 2t-2$
$$ \; = -\ln(t) - \frac{1}{2}\int\frac{1}{u}du$$
$$\; = -\ln(t) - \frac{1}{2}\ln(2t-2) + C$$
$$\implies \; y(t) = e^{-\ln(t)}e^{-\frac{1}{2}\ln(2t-2)}e^{C}$$
$$ y(t) = (\frac{1}{t})(\frac{1}{(2t-2)^{\frac{1}{2}}})e^{C}$$
$$ y(t) = e^{C}\frac{1}{t(2t-2)^{\frac{1}{2}}}$$
$$ y(t) = \frac{e^{C}}{\sqrt{2}}\frac{1}{t(t-1)^{\frac{1}{2}}} $$
The coefficient $\frac{e^C}{\sqrt{2}}$ is simply another constant. We will denote it as $C_1$. 
Recall that $\phi'(t) = y(t)$. Then 
$$\phi(t) = \int y(t)dt = C_1\int \frac{1}{t(t-1)^{\frac{1}{2}}} dt$$
Let $t = \cos(\theta)$, $dt = 2\cos(\theta)\sin(\theta)d\theta$
$$\phi = C_1 \int \frac{2\cos(\theta)\sin(\theta)}{\cos^2(\theta)\left (-\sin^2(\theta) \right )^{\frac{1}{2}}} d\theta$$
$$\phi = C_1 \int \frac{2\cos(\theta)\sin(\theta)}{i\cos^2(\theta)\sin(\theta)}d\theta$$
$$\phi = \frac{2C_1}{i} \int \frac{d\theta}{\cos(\theta)}$$
$\frac{2C_1}{i}$ is simply another fraction... so we denote it again as $C_1$.
$$\phi = C_1 \int \frac{d\theta}{\cos(\theta)}$$
$$\phi = C_1\ln|\sec(\theta) + \tan(\theta)| + C$$
$$t = cos^2\theta$$
$$\sqrt t = \cos\theta$$
$$\theta = \cos^{-1}t$$
$$\phi(t) = C_{1}\ln|\frac{1}{t} + \tan(\cos^{-1}t)| + C_{2}$$
$$\phi(t) = C_{1}\ln|\frac{1}{t} + \frac{\sin(\cos^{-1}t)}{\cos(\cos^{-1}t)}| + C_{2}$$
$$\phi(t) = C_{1}\ln|\frac{1}{t} + \frac{\sqrt{1-t^2}}{t}|+ C_{2}$$
$$\phi(t) = C_{1}\ln|\frac{1}{t}| + C_{1}\ln|1+\sqrt{1-t^2}|+C_{2}$$
A: $u(x,y):=\phi({x\over y}) $ where  $y\not=0$. 
$u_x(x,y)=\phi'({x\over y}){1\over y}$
$u_{xx}(x,y)=\phi''({x\over y}){1\over y^2}$
Similar computation gives : 
$u_y(x,y)=\phi'({x\over y}){x}$
$u_{yy}(x,y)=\phi''({x\over y}){x^2}$
$u_{xx}(x,y)+u_{yy}(x,y)=\phi''({x\over y})({x^2}+{1\over y^2})=0$
Therefore we can choose $\phi$ such that $\phi''(t)=0 $  for all $t\in \mathbb{R}$.
Therefore $\phi(t)=at+b$.
$u(x,y):=\phi({{x^2+y^2}\over x^2})$ where  $x\not=0$. 
$u_x(x,y)=\phi'({{x^2+y^2}\over x^2}){y^2 ({-2\over x^3})}$
$u_{xx}(x,y)=-2y^2[{1\over x^3}\phi''({{x^2+y^2}\over x^2}){y^2 {-2\over x^3}}+\phi'({{x^2+y^2}\over x^2}){-3\over x^4}]$$={4y^4\over x^6}\phi''({{x^2+y^2}\over x^2})+{6y^2\over x^4}\phi'({{x^2+y^2}\over x^2})$
Similar computation gives : 
$u_y(x,y)$$=\phi'({{x^2+y^2}\over x^2}){2y\over x^2}$

$u_{yy}(x,y)={2\over x^2}[\phi'({{x^2+y^2}\over x^2})+\phi''({{x^2+y^2}\over x^2}){2y^2\over x^2}]$$={2\over x^2}\phi'({{x^2+y^2}\over x^2})+\phi''({{x^2+y^2}\over x^2}){4y^2\over x^4}$Let $t={{x^2+y^2}\over x^2}$.
$u_{xx}(x,y)+u_{yy}(x,y)=({4y^4\over x^6}+{4y^2\over x^4})\phi''({{x^2+y^2}\over x^2})+({6y^2\over x^4}+{2\over x^2})\phi'({{x^2+y^2}\over x^2})$$={4y^2\over x^4}({{x^2+y^2}\over x^2})\phi''({{x^2+y^2}\over x^2})+{2\over x^2}({2y^2\over x^2}+{{x^2+y^2}\over x^2})\phi'({{x^2+y^2}\over x^2})$$={4\over x^2}(t-1)t\phi''(t)+({4\over x^2}(t-1)+{2\over x^2}t)\phi'(t)$$={4}(t-1)t\phi''(t)+(6t-4)\phi'(t)$$=(2t-2)t\phi''(t)+(3t-2)\phi'(t)$$=0$

Wolfram Alpha gives me that $\phi(t)=c+log[{{1-\sqrt(1-t)}\over{1+\sqrt(1-t)}}]$. 
A: For the first one, set $z=x/y$, $w=y$, so $\phi=\phi(z)$. Then
$$ \partial_x = (\partial_x z)\partial_z + (\partial_x w) \partial_w = \frac{1}{w}\partial_z, \\
\partial_y = (\partial_y z)\partial_z + (\partial_y w) \partial_w = -\frac{z}{w}\partial_z + \partial_w,
$$
so
$$ \begin{align*}
\partial_x \phi &= \frac{1}{w} \phi'(z), \\
(\partial_x)^2 \phi &= \frac{1}{w}\partial_z \left( \frac{1}{w} \phi'(z) \right) = \frac{1}{w^2} \phi''(z) \\
\partial_y \phi &= -\frac{z}{w} \phi'(z) \\
(\partial_y)^2 \phi &= \left(-\frac{z}{w}\partial_z + \partial_w\right) \left( -\frac{z}{w} \phi'(z) \right) = \frac{z}{w^2}(z\phi''(z) + \phi'(z)) + \frac{z}{w^2}\phi'(z)
\end{align*}$$
and so we find
$$ 0 =  \phi_{xx}+\phi_{yy} = \frac{1}{w^2}\left( 2z \phi'(z) + (1+z^2)\phi''(z)\right) $$
If $w \neq 0$, this equation is
$$ ((1+z^2)\phi')' = 0, $$
so
$$ \phi' = \frac{A}{1+z^2}, $$
forcing $\phi = B + A \arctan{(x/y)}$.

For the second one, I agree with @Srinivas K's answer, 'though my inclination would have been to set $z=1+y^2/x^2$ and $w=x$, (note: different notation from above!) so
$$
\partial_x = (\partial_x z) \partial_z + (\partial_x w) \partial_w = -2\frac{z-1}{y} \partial_z + \partial_w, \\
\partial_y = (\partial_y z) \partial_z + (\partial_y w) \partial_w = 2\frac{z-1}{y} \partial_z
$$
and so on, which gets you down to
$$ \frac{1}{w^2}\left( (6z-4)\phi'(z) + (4z^2-4z)\phi''(z) \right) = 0. $$
Dividing both sides, we get
$$ \frac{\phi''}{\phi'} = -\frac{3z-2}{2z(z-1)} = -\frac{1}{2}\frac{1}{z-1}-\frac{1}{z}, $$
and integrating gives
$$ \log{\phi'/A} = -\frac{1}{2}\log{(z-1)}-\log{z},\\
\phi' = \frac{A}{z\sqrt{z-1}},
$$
so
$$ \phi(z) = B+A\int \frac{dz}{z\sqrt{z-1}}  $$
At this point the trick is obviously $z=\sec^2{\theta}$, $dz = 2\sec^2{\theta}\tan{\theta}\, d\theta = 2z\sqrt{z-1} \, d\theta$, and the integral is
$$ \int 2 d\theta = 2\arctan{\sqrt{z-1}}= 2\arctan{\left(\sqrt{\left( 1 + \frac{x^2}{y^2} \right)-1}\right)} = 2\arctan{( \lvert x/y \rvert)}, $$
so the two answers are related.
