# Homework Help: 2nd order inhomogeneous ODE

1. Nov 25, 2009

### squaremeplz

1. The problem statement, all variables and given/known data

What's the general procedure for solving an i.v. b.v. ode of the form

(d^2 T(x))/ (d x^2) = -c * e^T(x)

T(+/-1) = 0
T'(0) = 0

where c is a constant

2. Relevant equations

i know from ode class that problems like this can usually be evaluated as

T'' + k^2*T = 0

3. The attempt at a solution

whats throwing me off is the e^T(x)

can i make a substitution like. T(x) = ln(y(x))

and solve

(d^2 ln(y(x))/ (d x^2) + c * y = 0

and ln(y)'' + sqrt(c)^2 * y = 0

thanks

and solve for y? or is this a violation?

2. Nov 25, 2009

### HallsofIvy

What you are talking about are linear differential equations but the equation you give is NOT linear. It is not just a matter of being "non-homogenous". For a non-homogeneous equation, the function on the right side (the one that is not multiplied by y or any of its derivatives) must be a function of the independent variable only.

You certainly could make the substitution y= eT, but I don't see how you would then solve (ln y)"- cy= 0. That's just as badly non-linear.

This is my suggestion: let v= dT/dx. Then d2T/dx2= dv/dx= (dv/dT)(dT/dx)= v(dv/dt) so the equation becomes v(dv/dt)= -ceT which is easily integrable: (1/2)v2= -ceT+ C1.

Now we have $v= dx/dt= \sqrt{2(C_1- ce^T)}$] so that $v= \int \sqrt{2(C- ce^T)}+ C_2$.

You might have trouble actually integrating that, but that is the basic idea.

3. Nov 30, 2009

### squaremeplz

ok, i see your point about the nonliniarity.

in solving the last integral

$$\frac {dx}{dt} = \sqrt{2(C_1 - ce^T)}$$

did u replace the constant $$C_1 = 2*c*C_o$$ ?

since when u integrate, don't u have to take the c out of the integral since it is a constant? This has actually been a huge source of confusion for me.

$$2\int {ce^T dT} = 2c \int {e^T dt} = 2ce^t + 2cC_1$$

or

$$2\int {ce^T dT} = 2 \int {ce^T dt} = 2ce^t + 2C_1$$

the reason why i ask is because the constats for this problem are key in understanding the analytical boundaries of the problem.

4. Nov 30, 2009

### andylu224

There's been one mistake running through it all... v = dT/dx NOT dx/dT

I've worked out a solution but it doesn't fit with T(1) = T(-1) = 0
But it does work if x = 0, T = 0. No problems with T'(0) = 0.

x = - sqrt(2/c) {ln|1 + sqrt(1 - e^T)| - 1/2 T}

That's the best i could do.

5. Nov 30, 2009

### squaremeplz

your answer is actually right on i think, but did u use integration by parts? and which substitution?

Thanks

Last edited: Nov 30, 2009
6. Nov 30, 2009

### andylu224

This question has quite a few twists to it, especially if you want to get an explicit equation with T as the subject. i checked my solution and you get back to the original second order equation.

dx/dT = 1/sqrt[2(k - ce^T) Where k is an arbitrary constant like you C1

to integrate this, i used e^T = k/c sin^2 (theta)

i got down to: x = -sqrt(2/k) { ln |sqrt(k) + sqrt(k-c)| - 1/2 ln|c| - 1/2 T} + A
where A is a constant

Using T'(0) = 0 has a trick to it:

at x = 0, dT/dx = 0 --> T = ln(k/c)
Therefore, at x = 0, T = ln(k/c)

Doing so, will yield A = 0

There's one problem after this relating to T(-1) = T(1) = 0

Initally, i inputed the values (x = 1 and -1, T = 0) into the equation and then substitution method for simultaneous equations. I got k = c.

Problem is when i tried to input the values back into the final finished equation, i get a contradiction --> 1 = 0.

So i suspect that the question may be wrong. either that i missed something.

I resolved the issue by saying that x = 0, T = 0 instead

I also was able to get an equation for T using a few tricks as well:

T = 2 { ln |2e^ (x sqrt(2/c))| - ln |1 + e^(x sqrt(2c))|

So have a go at getting that solution.

If you have any problems or want to see my working out, i can email it to you if u want.

Last edited: Dec 1, 2009
7. Dec 1, 2009

### squaremeplz

everything makes sense to me, however.. im trying to integrate the function such that both integration constants are left as is..

Last edited: Dec 1, 2009
8. Dec 2, 2009

### andylu224

what do you mean?

In this integral problem, you'll have 3 constants: one you started with (c), one you attained from the first integration (k or C1), and the last from the final integration (A)

Since you gave me pairs of values for x,T and T', the constants will result in a certain value and the solution becomes particular rather than general.

If you wanted just the general solution, then values for x,T, and T' were unnecessary.

But is there more to the question? Can i have the whole question verbatim?