Take the definition of a connected topological space to be one that has no clopen sets other than the space itself or the empty set.
I claim to prove that if $f: X \to Y$ is a continuous function between topological spaces and that if $X$ is connected then the image $f(X)$ is connected also.
proof:
Assume for a contradiction that $X$ is connected and $f(X)$ is disconnected.
Then $\exists U \subset f(X)$ such that $U$ is clopen under the subset topology of $f(X)$ and $ U \neq \emptyset$, $U \neq f(X)$.
Since $f$ is continuous, $f^{-1}(U)$ is both open and closed since $U$ is clopen. Hence $f^{-1}(U)$ is a clopen set in $X$, all that is left to do is to show that it is non trivial.
Since by assumption $U \neq \emptyset$ and $U \subset f(X)$; $f^{-1}(U) \neq \emptyset$.
Furthermore $U \neq f(X)$ so $\exists a \in f(X)\backslash U$
$\therefore f^{-1}\{a\} \in X \backslash f^{-1}(U)$
$\therefore f^{-1}(U) \neq X$
So $f^{-1}(U)$ is a non trivial clopen subset of $X$ and $X$ is disconnected contradictory to what was assumed. Therefore $f(X)$ must be connected also. $\square$
Is this proof correct? It is different from the one I have seen in my topology class and I am dubious of its simplicity.
You're almost good;
You cannot state that $f^{-1}(U)$ is clopen because you don't know that $f(X)$ is open or closed in $Y$!
To overcome this difficulty simply notice that the restriction map $f:X \to f(X)$ is itself continuous, when $f$ is. Then the proof becomes quite trivial. Any separation of $f(X)$ projects back to two non empty sets, whose union must be $X$..