- #1

- 3

- 0

question is:

u'' + 3*u^2 *( 1 / (sin^2(x)) =2.5

BCs:

u'(1)=0.95

u(2)=0.83

h=0.25

(radian for sin function)

- Thread starter zeynepkisa
- Start date

- #1

- 3

- 0

question is:

u'' + 3*u^2 *( 1 / (sin^2(x)) =2.5

BCs:

u'(1)=0.95

u(2)=0.83

h=0.25

(radian for sin function)

- #2

HallsofIvy

Science Advisor

Homework Helper

- 41,833

- 961

Exactly how are you applying "finite difference"? Are you assuming a linear solution overe each interval?

Last edited by a moderator:

- #3

arildno

Science Advisor

Homework Helper

Gold Member

Dearly Missed

- 9,970

- 133

As for the boundary condition, since it involves a derivative, you should regard it the actual left boundary as an interior point.

Thus, introduce a fictitious boundary point [itex]x_{0}=1-h[/tex]

and you have n+1 points [itex]x_{0}, x_{1}=1,\cdots{x}_{n}=2[/tex]

The differential equation should be satisfied at all interior points, so that you have n+1 non-linear equations like this:

[tex]\frac{u_{2}-u_{0}}{2h}=0.95, u_{n}=0.83[/tex]

and:

[tex]\frac{u_{i+1}-2u_{i}+u_{i-1}}{h^{2}}+3u_{i}^{2}\frac{1}{\sin^{2}(x_{i})}=2.5, i=1,\cdots{n-1}[/tex]

Now, you are ready to see how to implement a loop structure to actually solve this system approximately..

Thus, introduce a fictitious boundary point [itex]x_{0}=1-h[/tex]

and you have n+1 points [itex]x_{0}, x_{1}=1,\cdots{x}_{n}=2[/tex]

The differential equation should be satisfied at all interior points, so that you have n+1 non-linear equations like this:

[tex]\frac{u_{2}-u_{0}}{2h}=0.95, u_{n}=0.83[/tex]

and:

[tex]\frac{u_{i+1}-2u_{i}+u_{i-1}}{h^{2}}+3u_{i}^{2}\frac{1}{\sin^{2}(x_{i})}=2.5, i=1,\cdots{n-1}[/tex]

Now, you are ready to see how to implement a loop structure to actually solve this system approximately..

Last edited:

- #4

- 3

- 0

thanks for your attention

- #5

arildno

Science Advisor

Homework Helper

Gold Member

Dearly Missed

- 9,970

- 133

Have you decided upon a strategy to take care of the non-linearity?

- #6

- 3

- 0

yes newton method

- Last Post

- Replies
- 6

- Views
- 829

- Last Post

- Replies
- 2

- Views
- 3K

- Last Post

- Replies
- 1

- Views
- 2K

- Replies
- 2

- Views
- 7K

- Last Post

- Replies
- 0

- Views
- 1K

- Last Post

- Replies
- 0

- Views
- 1K

- Replies
- 5

- Views
- 610

- Last Post

- Replies
- 9

- Views
- 2K

- Last Post

- Replies
- 1

- Views
- 776

- Replies
- 6

- Views
- 1K