# Euler's formula and differential equations

## Homework Statement

Consider the complex number $$z=rcos\theta + irsin\theta$$, where $$r=|z|$$, $$\theta=arg(z)$$ ($$r$$ is constant, $$\theta$$ is a variable). Show that $$\frac{dz}{d\theta}=iz$$, then solve this differential equation to show that $$z=re^{i\theta}$$.

## Homework Equations

$$z=rcos\theta + irsin\theta$$

$$z=re^{i\theta}$$

$$r=|z|$$

$$\theta=arg(z)$$

## The Attempt at a Solution

I had no problem showing that $$\frac{dz}{d\theta}=iz$$. My problem was with the second part; I thought it was pretty straightforward, but it simply didn't work.

$$\frac{dz}{d\theta}=iz$$

$$\frac{d\theta}{dz}=\frac{1}{iz}$$

$$i\int\frac{d\theta}{dz}dz=\int\frac{1}{z}dz$$

$$i\theta=ln|z|+C$$

$$i\theta-C=lnr$$

$$e^{i\theta-C}=r$$

$$e^{-C}\times e^{i\theta} = r$$

Which is impossible! For this to be Euler's formula, $$e^{-C}$$ needs to be equal to $$r$$, which I suppose is okay because $$e$$, $$C$$ and $$r$$ are constants. But the problem is the $$r$$ in the right-hand side of the equation. The only way I see for it to be $$z$$ instead of $$r$$ would be if $$\int\frac{1}{z}dz=lnz$$ rather than $$\int\frac{1}{z}dz=ln|z|$$. But this is cannot be, or can it?
Thanks.

Mark44
Mentor

## Homework Statement

Consider the complex number $$z=rcos\theta + irsin\theta$$, where $$r=|z|$$, $$\theta=arg(z)$$ ($$r$$ is constant, $$\theta$$ is a variable). Show that $$\frac{dz}{d\theta}=iz$$, then solve this differential equation to show that $$z=re^{i\theta}$$.

## Homework Equations

$$z=rcos\theta + irsin\theta$$

$$z=re^{i\theta}$$

$$r=|z|$$

$$\theta=arg(z)$$

## The Attempt at a Solution

I had no problem showing that $$\frac{dz}{d\theta}=iz$$. My problem was with the second part; I thought it was pretty straightforward, but it simply didn't work.

$$\frac{dz}{d\theta}=iz$$
It's quicker to move things around to get z and dz on one size and $d\theta$ on the other.
$$\frac{dz}{z }=id\theta$$
Now integrate to get an equation involving z and $\theta$.
$$\frac{d\theta}{dz}=\frac{1}{iz}$$

$$i\int\frac{d\theta}{dz}dz=\int\frac{1}{z}dz$$

$$i\theta=ln|z|+C$$
What if you work this through without replacing |z| as you did in the following equation?
$$i\theta-C=lnr$$

$$e^{i\theta-C}=r$$

$$e^{-C}\times e^{i\theta} = r$$

Which is impossible! For this to be Euler's formula, $$e^{-C}$$ needs to be equal to $$r$$, which I suppose is okay because $$e$$, $$C$$ and $$r$$ are constants. But the problem is the $$r$$ in the right-hand side of the equation. The only way I see for it to be $$z$$ instead of $$r$$ would be if $$\int\frac{1}{z}dz=lnz$$ rather than $$\int\frac{1}{z}dz=ln|z|$$. But this is cannot be, or can it?
Thanks.

What if you work this through without replacing |z| as you did in the following equation?
Thanks for the help, but I don't see how not replacing |z| by r solves anything. I would still get a |z| instead of a z. Besides, if I have defined |z| to be r, then I should be able to freely substitute |z| by r without any contradiction, shouldn't I?