Non-homogenous ODE, non-homogenous boundaries

  • Thread starter nrhoades
  • Start date
  • Tags
    Ode
In summary, the individual is struggling to solve a one-dimensional, one variable ODE. They have learned that the equation is a non-homogeneous ODE with non-homogenous boundaries. They have tried using FDM to solve them, but have not gotten far. They need help from a math-wiz. The solution given by Mathematica is the correct model for the homogenous boundary problem. However, they need the solution to the non-homogenous boundary problem to solve the problem.
  • #1
nrhoades
11
0
I've made a lot of simplifications to a Joule-heating problem I'm working on. I'm struggling to solve the following one-dimensional, one variable ODE:

Txx + aT = -b

with boundary conditions

T(x=0) = Ts (Dirichlet)
Tx(x=L) = 0 (Neumann)

I've learned that this is a non-homogeneous ODE with non-homogenous boundaries. I've tried using FDM to solve them and then fitting the data to a function, but I didn't get far.

I would love some help on this. I have much more experience with numerical analysis than analytical. I really need a math-wiz's help.
 
Physics news on Phys.org
  • #2
I apologize for being to lazy to work out where this really comes from, but here's the solution Mathematica gives:

[tex]
T(x)\to \frac{1}{a}\left(-b \cot \left(\sqrt{a} L\right) \sin \left(\sqrt{a} x\right)+b \csc \left(\sqrt{a} L\right) \sin \left(\sqrt{a} x\right)+b \cos \left(\sqrt{a} x\right)-a T_s \cot \left(\sqrt{a} L\right) \sin \left(\sqrt{a} x\right)+a T_s \cos \left(\sqrt{a} x\right)-b\right)
[/tex]
 
  • #3
pmsrw3 said:
I apologize for being to lazy to work out where this really comes from, but here's the solution Mathematica gives:

[tex]
T(x)\to \frac{1}{a}\left(-b \cot \left(\sqrt{a} L\right) \sin \left(\sqrt{a} x\right)+b \csc \left(\sqrt{a} L\right) \sin \left(\sqrt{a} x\right)+b \cos \left(\sqrt{a} x\right)-a T_s \cot \left(\sqrt{a} L\right) \sin \left(\sqrt{a} x\right)+a T_s \cos \left(\sqrt{a} x\right)-b\right)
[/tex]

pmsrw3, very close! Please see the following two plots:

The equation you gave models the homogenous boundary problem exactly, which is:

Txx + aT = -b, T(x=0) = Ts, T(x=L) = 0 (first plot)

What I need is the solution to the NON-homogenous boundary problem:

Txx + aT = -b, T(x=0) = Ts, Tx(x=L) = 0 (second plot)

the difference being that the x=L boundary is Neumann, not Dirichlet.

Can you do what you did again with this Newmann boundary?

Almost there!
 

Attachments

  • homogenous_plot.png
    homogenous_plot.png
    13.2 KB · Views: 570
  • nonhomogenous_plot.png
    nonhomogenous_plot.png
    12.3 KB · Views: 575
  • #4
Oops, sorry. I must have left out a '.

[tex]
T(x)\to \frac{(a T_s+b) \sec \left(\sqrt{a} L\right) \cos \left(\sqrt{a} (L-x)\right)-b}{a}[/tex]
 
  • #5
I simultaneously found the solution. The form is

T(x) = C1*cos(sqrt(a)*x) + C2*sin(sqrt(a)*x) - b/a

where C1 = Ts + b/a, C2 = C1*tan(sqrt(a)*L)

Your solution looks like it takes this form after some trig flexing.

Thanks!
 

Attachments

  • solution.png
    solution.png
    12.8 KB · Views: 559
  • #6
What do you get when a is negative?
 
  • #7
The same result will work. [itex]\sqrt{a}[/itex] is imaginary, but it all works out real in the end. [itex]\cos(i\alpha) = \cosh(\alpha), \sec(i\alpha) = \text{sech}(\alpha)[/itex].

If you want it written in terms of explicitly real functions: Letting alpha = -a, assuming alpha > 0, and solving [itex]T''(x)-\alpha T(x)=-b[/itex], I get

[tex]
T(x)\to \frac{e^{\sqrt{\alpha } (-x)} \left(\alpha T_s \left(e^{2 \sqrt{\alpha } L}+e^{2 \sqrt{\alpha } x}\right)-b \left(e^{\sqrt{\alpha } x}-1\right) \left(e^{\sqrt{\alpha } x}-e^{2 \sqrt{\alpha } L}\right)\right)}{\alpha \left(e^{2 \sqrt{\alpha } L}+1\right)}
[/tex]
 
  • #8
Thanks! Thread closed!
 
  • #9
pmsrw3: Last one...

Quickly, can you do:

y'' = 0
y'(x=0) = inf
y(x=L) = a

I don't know if this is possible.

Thanks!
 
  • #10
I don't need to run that one -- it obviously doesn't have a solution. y'' = 0 says y' is the same everywhere. y' is infinite at 0, so it's infinite everywhere. Obviously this does not have a finite solution.
 
  • #11
I FDM'ed this too and I agree. For some reason it wasn't obvious to me at first. Thanks.
 

FAQ: Non-homogenous ODE, non-homogenous boundaries

What is a non-homogenous ODE?

A non-homogenous ODE (Ordinary Differential Equation) is an equation that involves a dependent variable, its derivatives, and a function of the independent variable. The function of the independent variable is known as the non-homogenous term, and it makes the equation non-homogenous. In other words, the coefficients of the dependent variable and its derivatives are not all zero.

How is a non-homogenous ODE different from a homogenous ODE?

A homogenous ODE is an equation where the non-homogenous term is equal to zero. This means that the coefficients of the dependent variable and its derivatives are all zero, and the equation can be solved using standard techniques. In contrast, a non-homogenous ODE has a non-zero non-homogenous term, making it more difficult to solve.

What are non-homogenous boundaries in a differential equation?

Non-homogenous boundaries refer to boundary conditions that involve non-homogenous terms. These terms are usually functions of the independent variable and can make the boundary conditions more complex to solve. Non-homogenous boundaries are commonly seen in boundary value problems.

How are non-homogenous ODEs and non-homogenous boundaries solved?

Non-homogenous ODEs and non-homogenous boundaries can be solved using various methods, such as the method of undetermined coefficients, variation of parameters, and Laplace transforms. The specific method used depends on the complexity of the equation and the available initial/boundary conditions.

What are some real-life applications of non-homogenous ODEs and non-homogenous boundaries?

Non-homogenous ODEs and non-homogenous boundaries have many applications in science and engineering, such as in modeling population growth, chemical reactions, and electrical circuits. These equations also play a crucial role in understanding the behavior of physical systems and predicting their future states.

Back
Top