Non-homogenous ODE, non-homogenous boundaries

  • Thread starter nrhoades
  • Start date
  • #1
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.
 

Answers and Replies

  • #2
459
0
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
11
0
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

  • #4
459
0
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
11
0
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

  • #6
11
0
What do you get when a is negative?
 
  • #7
459
0
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
11
0
Thanks! Thread closed!
 
  • #9
11
0
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
459
0
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
11
0
I FDM'ed this too and I agree. For some reason it wasn't obvious to me at first. Thanks.
 

Related Threads on Non-homogenous ODE, non-homogenous boundaries

  • Last Post
Replies
4
Views
2K
Replies
5
Views
4K
Replies
1
Views
2K
  • Last Post
Replies
8
Views
3K
Replies
1
Views
8K
Replies
1
Views
2K
Replies
0
Views
283
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
11
Views
2K
Top