# I How do I classify this partial differential equation? Inhomogeneous?

#### Phys pilot

Hello,

I have to solve this second order differential equation. It's like a string vibrating equation but with a constant c:

$$\frac{{\partial^2 u}}{{\partial t^2}}=k\frac{{\partial^2 u}}{{\partial x^2}}+c$$

B.C $$u(0,t)=0$$ $$u(1,t)=2c_0$$ c_0 is also a constant

I.C $$u(x,0)=c_0(1-\cos\pi x)$$

This is new for me and I would like to know how to classify it and maybe some recommended book that includes this because mine doesn't and I think I can not separate variables. I have never seen a equation with a constant and then just one initial condition, they usually give us two.
thank you

Related Differential Equations News on Phys.org

#### andrewkirk

Homework Helper
Gold Member
The presence of a constant makes a linear DE like this inhomogeneous.

Can you solve the equation without the constant?

If so, what happens if you take that solution and add to it a function of only $t$ that, when differentiated twice wrt $t$, gives $c$?

#### pasmith

Homework Helper
The presence of a constant makes a linear DE like this inhomogeneous.

Can you solve the equation without the constant?

If so, what happens if you take that solution and add to it a function of only $t$ that, when differentiated twice wrt $t$, gives $c$?
Probably best to take a function of $x$ which when differentiated twice yields $-c/k$ and satisfies the boundary conditions at 0 and 1, since you can then subtract it from $c_0(1 - \cos(\pi x))$ and expand the difference as a sine series on [0,1] to get the initial conditions for the complimentary functions.

#### Phys pilot

Probably best to take a function of $x$ which when differentiated twice yields $-c/k$ and satisfies the boundary conditions at 0 and 1, since you can then subtract it from $c_0(1 - \cos(\pi x))$ and expand the difference as a sine series on [0,1] to get the initial conditions for the complimentary functions.
The presence of a constant makes a linear DE like this inhomogeneous.

Can you solve the equation without the constant?

If so, what happens if you take that solution and add to it a function of only $t$ that, when differentiated twice wrt $t$, gives $c$?
I'm a little bit lost. So, I have to solve it first without the constant which should be easy. But then? I didn't understand the second part. Thats why I'm looking for a book or pdf solving a case like this. Because I found some that intead of a constant they add a function but then the B.C and I.C are different.

I have another doubt, I think that a u_t I.C is missing right? or can I solve it without it?
thanks, sorry for my english

#### pasmith

Homework Helper
The thing about linear problems, such as this one, is that you can split them up into simpler linear problems which you can already solve. Then you just add the solutions together.

So here the simplest method is to write $$u(x,t) = u_1(x) + u_2(x,t)$$ where $u_1$ satisfies $$0 = k\frac{d^2u_1}{dx^2} + c$$ and $u_2$ satisfies $$\frac{\partial^2 u_2}{\partial t^2} = k \frac{\partial^2 u_2}{\partial x^2}$$ so that the sum $u$ satisfies $$\frac{\partial^2 u}{\partial t^2} = k \frac{\partial^2 u}{\partial x^2} + c$$as required.

Now we need to satisfy the boundary conditions. Our only constraint is on the value of $u_1 + u_2$, so we are free to choose the conditions on $u_1$ to our advantage. My suggestion is to take $u_1(0) = 0$ and $u_1(1) = 2c_0$ so that $u_2(0,t) = u_2(1,t) = 0$. The initial condition on $u_2$ must then be $$u_1(x) + u_2(x,0) = c_0(1 - \cos(\pi x)).$$ Thus we are left with two problems:

(1) Solve $$\frac{d^2u_1}{dx^2} = -c/k$$ subject to $u_1(0) = 0$ and $u_1(1)=2c_0$.

(2) Solve $$\frac{\partial^2 u_2}{\partial t^2} = k \frac{\partial^2 u_2}{\partial x^2}$$ subject to $u_2(0,t) = u_2(1,t) = 0$ and $$u_2(x,0) = c_0(1 - \cos(\pi x)) - u_1(x).$$

Hopfully you know how to solve each of those problems separately.

(There is a missing initial condition on $u_t$. My suggestion is to assume that $u_t(x,0) = 0$.)

Why did I not follow @andrewkirk's suggestion of writing $u(x,t) = u_3(t) + u_4(x,t)$? Because that leaves me with a problem for $u_4$ with boundary conditions $$u_4(0,t) = -u_3(t), \qquad u_4(1,t) = 2c_0 - u_3(t),\qquad u_4(x,0) = c_0(1-\cos(\pi x)) - u_3(0)$$ which is much harder to solve than the problem for $u_2$ above.

#### Phys pilot

The thing about linear problems, such as this one, is that you can split them up into simpler linear problems which you can already solve. Then you just add the solutions together.

So here the simplest method is to write $$u(x,t) = u_1(x) + u_2(x,t)$$ where $u_1$ satisfies $$0 = k\frac{d^2u_1}{dx^2} + c$$ and $u_2$ satisfies $$\frac{\partial^2 u_2}{\partial t^2} = k \frac{\partial^2 u_2}{\partial x^2}$$ so that the sum $u$ satisfies $$\frac{\partial^2 u}{\partial t^2} = k \frac{\partial^2 u}{\partial x^2} + c$$as required.

Now we need to satisfy the boundary conditions. Our only constraint is on the value of $u_1 + u_2$, so we are free to choose the conditions on $u_1$ to our advantage. My suggestion is to take $u_1(0) = 0$ and $u_1(1) = 2c_0$ so that $u_2(0,t) = u_2(1,t) = 0$. The initial condition on $u_2$ must then be $$u_1(x) + u_2(x,0) = c_0(1 - \cos(\pi x)).$$ Thus we are left with two problems:

(1) Solve $$\frac{d^2u_1}{dx^2} = -c/k$$ subject to $u_1(0) = 0$ and $u_1(1)=2c_0$.

(2) Solve $$\frac{\partial^2 u_2}{\partial t^2} = k \frac{\partial^2 u_2}{\partial x^2}$$ subject to $u_2(0,t) = u_2(1,t) = 0$ and $$u_2(x,0) = c_0(1 - \cos(\pi x)) - u_1(x).$$

Hopfully you know how to solve each of those problems separately.

(There is a missing initial condition on $u_t$. My suggestion is to assume that $u_t(x,0) = 0$.)

Why did I not follow @andrewkirk's suggestion of writing $u(x,t) = u_3(t) + u_4(x,t)$? Because that leaves me with a problem for $u_4$ with boundary conditions $$u_4(0,t) = -u_3(t), \qquad u_4(1,t) = 2c_0 - u_3(t),\qquad u_4(x,0) = c_0(1-\cos(\pi x)) - u_3(0)$$ which is much harder to solve than the problem for $u_2$ above.
Thank you. So it's the general solution of the homogeneous equation plus a particular solution.
I will try to solve the problem and post the solution here. Thank you again.

"How do I classify this partial differential equation? Inhomogeneous?"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving