# John-117's question at Yahoo! Answers regarding a Cauchy-Euler equation

#### MarkFL

Staff member
Here is the question:

Cauchy-euler [[ (x+3)^2 y'' + 3(x+3)y' +5y = 0 , x+3>0 ]] general solution?

I tried the [[ y = x^m, y' = mx^m-1, y'' = m(m-1)*x^m-2 ]] but when I do it the x don't cancel. Please explain and show steps, thank you.
I have given a link to the topic there so the OP can see my work.

#### MarkFL

Staff member
Hello John-117,

We are given the Cauchy-Euler equation:

(1) $$\displaystyle (x+3)^2y''+3(x+3)y'+5y=0$$ where $$\displaystyle 0<x+3$$

Making the substitution:

$$\displaystyle x+3=e^t$$

will transform the ODE into an equation with constant coefficients.

It follows from the chain rule that:

$$\displaystyle \frac{dy}{dt}=\frac{dy}{dx}\frac{dx}{dt}=\frac{dy}{dx}e^t=(x+3)\frac{dy}{dx}$$

and hence:

(2) $$\displaystyle (x+3)\frac{dy}{dx}=\frac{dy}{dt}$$

Differentiating this with respect to $t$, we find from the product rule that:

$$\displaystyle \frac{d^2y}{dt^2}=\frac{d}{dt}\left((x+3)\frac{dy}{dx} \right)=(x+3)\frac{d}{dt}\left(\frac{dy}{dx} \right)+\frac{dx}{dt}\frac{dy}{dx}=$$

$$\displaystyle (x+3)\frac{d^2y}{dx^2}\frac{dx}{dt}+\frac{dy}{dt}=(x+3)^2\frac{d^2y}{dx^2}+\frac{dy}{dt}$$

and hence:

(3) $$\displaystyle (x+3)^2\frac{d^2y}{dx^2}=\frac{d^2y}{dt^2}-\frac{dy}{dt}$$

Substituting into (1), the expressions in (2) and (3), we obtain:

$$\displaystyle \frac{d^2y}{dt^2}-\frac{dy}{dt}+3\frac{dy}{dt}+5y=0$$

Collecting like terms, we obtain:

(4) $$\displaystyle \frac{d^2y}{dt^2}+2\frac{dy}{dt}+5y=0$$

The characteristic roots are:

$$\displaystyle r=-1\pm2i$$

and so the general solution to (4) is:

$$\displaystyle y(t)=e^{-t}\left(c_1\cos(2t)+c_2\sin(2t) \right)$$

Back-substituting for $t$, we obtain:

$$\displaystyle y(x)=\frac{c_1\cos\left(2\ln(x+3) \right)+c_2\sin\left(2\ln(x+3) \right)}{x+3}$$

#### john96

##### New member
Thanks mark, our teacher never went over substitutions for these equations.

Why did you pick e^t for the substitution? and where does the final answer's (...)/x+3 come from?

#### MarkFL

Staff member
Hello john96,

As you can see in my second post above, using the substitution:

$$\displaystyle x+3=e^t$$

transforms the ODE into a linear homogeneous ODE, that is, an equation with constant coefficients, via (2) and (3).

This substitution then implies:

$$\displaystyle e^{-t}=\frac{1}{x+3}$$ and $$\displaystyle t=\ln(x+3)$$

which I back-substituted into the general solution for (4). Are you asking where the general solution to (4) comes from?

#### john96

##### New member
I mean that you didn't use a generic variable substitution such as x or u, would those not wwork out?
Thanks.

#### MarkFL

Staff member
No, simply replacing one variable with another would not give you a linear quation with constant coefficients.

Another method for finding solutions to a homogeneous Cauchy-Euler equation involves guessing a solution of the form $y=x^r$, which leads to an auxiliary equation for $r$. However, there is often an advantage in making the substitution $x=e^t$ when trying to solve an inhomogeneous Cauchy-Euler equation by the methods of undetermined coefficients or Laplace transforms.

Let's look at what happens in your posted problem if we guess a solution of the form:

$$\displaystyle y(x)=(x+3)^r$$

Differentiating with respect to $x$ using the power rule, we find:

$$\displaystyle y'(x)=r(x+3)^{r-1}$$

$$\displaystyle y''(x)=r(r-1)(x+3)^{r-2}$$

Now, substituting into the ODE, we find:

$$\displaystyle (x+3)^2\left(r(r-1)(x+3)^{r-2} \right)+3(x+3)\left(r(x+3)^{r-1} \right)+5(x+3)^r=0$$

Factoring, we obtain:

$$\displaystyle (x+3)^r\left(r(r-1)+3r+5 \right)=0$$

Dividing through by $$\displaystyle 0<(x+3)^r=y(x)$$, thereby eliminating the trivial solution $y(x)\equiv0$, we obtain:

$$\displaystyle r^2+2r+5=0$$

Application of the quadratic formula gives us:

$$\displaystyle r=-1\pm2i$$

from which it follows that the ODE has the two linearly independent solutions:

$$\displaystyle y_1(x)=c_1(x+3)^{-1+2i}$$

$$\displaystyle y_2(x)=c_2(x+3)^{-1-2i}$$

We may now use Euler's formula as follows:

$$\displaystyle x^{\alpha+\beta i}=e^{(\alpha+\beta i)\ln(x)}=e^{\alpha\ln(x)}\left(\cos(\beta\ln(x)+i\sin(\beta\ln(x)) \right)$$

Since the real and imaginary parts of $$\displaystyle (x+3)^{-1\pm2i}$$ must also be solutions to the ODE, we may replace our two linearly independent solutions with:

$$\displaystyle y_1(x)=c_1e^{-\ln(x+3)}\cos(2\ln(x+3))=\frac{c_1\cos(2\ln(x+3))}{x+3}$$

$$\displaystyle y_2(x)=c_2e^{-\ln(x+3)}\sin(2\ln(x+3))=\frac{c_2\sin(2\ln(x+3))}{x+3}$$

And so the general solution is:

$$\displaystyle y(x)=y_1(x)+y_2(x)=\frac{c_1\cos(2\ln(x+3))+c_2 \sin(2\ln(x+3))}{x+3}$$

#### john96

##### New member
Oh okay thanks a load! My teacher only showed us that second way, so I couldn't follow the first method.