Initial value problem for system of two diff. equation

In summary: I have a feeling you're trying to do something you don't understand. Once you can get a handle on it then maybe we can work together to get what you need.In summary, the conversation is about solving a system of differential equations using the Mathematica program. The system of equations involves variables y and b, and the goal is to find the initial value of b (b0) that satisfies the initial and boundary values of y. The conversation also includes the use of functions ub, ubb, uba, and a to represent different equations. The conversation ends with a suggestion to further study and manipulate the code provided in order to achieve the desired outcome.
  • #1
goos
3
0
Hi all!

I have quiet a lot a problems solving and programing with Mathematica this system of diff. equations:

y'[x] == 1/b[x],
b'[x] == 1/ubb 1/(y[x] + R1) 1/b[x] (uba 1/(y[x] + R1) - ub),

b[0] == b00,
y[0] == 0
y[2] == Sqrt[5]

where ubb, uba, ub are functions:
ub = b[x] - b[x]/a Hypergeometric2F1[1/2, 3/2, 2, 1 - b[x]^2/a^2];
ubb = 1 -
1/a Hypergeometric2F1[1/2, 3/2, 2, 1 - b[x]^2/a^2] + (3 b[x]^2)/(
4 a^3) Hypergeometric2F1[3/2, 5/2, 3, 1 - b[x]^2/a^2];
uba = (3 b[x])/(4 a^2) Hypergeometric2F1[3/2, 3/2, 3, 1 - b[x]^2/a^2]
and
a = 1/(y[x] + R1)

I'm trying to find initial value for b[0] ("value b00") with respect to initial and boundary value of the other variable y[0]=0, y[2]=Sqrt[5].

I hope I wrote down enough informations and also hope that someone will have time and joy to solve this or just give some advice.

Have a nice day,
goos
 
Physics news on Phys.org
  • #2
What's R1?
 
  • #3
jackmell said:
What's R1?

sorry, R1=1
 
  • #4
Then that looks like a problem dude unless I have the equations wrong. Here's a hit-and-miss routine to find b(0) such that y(2)=sqrt(5). Note that when I set r1=1, y(2) keeps rising as b(0) drops to about 0.4 at which point Mathematica begins encountering singularities. Try uploading this code into your notebook, select it, then do a Cell/Convert To/Standard Form to see it better. Review the syntax to make sure the equations are correct. Then you can work with it and adjust both the r1 variable and mybval variable.

Code:
r1 = 1; 
bmax = 2; 
a[x_] := 1/(y[x] + r1); 

mytarget = Graphics[Line[{{0, Sqrt[5]}, {100, Sqrt[5]}}]]; 

ub[x_] := b[x] - (b[x]/a[x])*Hypergeometric2F1[1/2, 3/2, 2, 1 - 
b[x]^2/a[x]^2]; 

ubb[x_] := 1 - (1/a[x])*Hypergeometric2F1[1/2, 3/2, 2, 1 - b[x]^2/a[x]^2] + 
    ((3*b[x]^2)/(4*a[x]^3))*Hypergeometric2F1[3/2, 5/2, 3, 1 - 
b[x]^2/a[x]^2]; 

uba[x_] := ((3*b[x])/(4*a[x]^2))*Hypergeometric2F1[3/2, 3/2, 3, 1 - b[x]^2/a[x]^2]; 

mybvalues = Table[mysol = NDSolve[{Derivative[1][y][x] == 1/b[x], 
        Derivative[1][b][x] == (1/ubb[x])*(1/(y[x] + r1))*(1/b[x])*
          (uba[x]/(y[x] + r1) - ub[x]), y[0] == 0, b[0] == mybval}, {y, b}, 
       {x, 0, 2}]; {mybval, First[N[y[2] /. mysol]]}, {mybval, 0.4, 1, 0.1}]; 

Show[{ListPlot[mybvalues, Joined -> True], mytarget}, 
  PlotRange -> {{0, bmax}, {0, 5}}]
 
  • #5
Hi,
thank you for helping me. Your solution in working well, but my problem is a little bit complex like the one I posted. So, I would like you to look at it one more time.

My main problem is determining b0 (initial value of b function) so that the initial an boundary values of y are y[0]=R1 and y[L]=R2, vhere {x,0,L}, R1=1, R2=Sqrt[R1^2+2 L Rc], Rc=1 (some starting values). I have to program it in a way, that I will be able to change R1, R2, Rc which will determine b0.
I'm already solve it by 'hand' method, but I would like to use possibilities that Mathematica offer and also the solution (program) will probably look nicer.

goos


L =.
R1 =.
R2 =.
Rc =.
a =.
r =.
r0 =.
b00 =.
Clear[y, b, f]

ua = a - Hypergeometric2F1[1/2, 1/2, 2, 1 - b[x]^2/a^2];
ub = b[x] - b[x]/a Hypergeometric2F1[1/2, 3/2, 2, 1 - b[x]^2/a^2];
uaa = 1 - 1/a Hypergeometric2F1[1/2, 1/2, 2, 1 - b[x]^2/a^2] +
3/(4 a) Hypergeometric2F1[3/2, 1/2, 3, 1 - b[x]^2/a^2];
ubb = 1 -
1/a Hypergeometric2F1[1/2, 3/2, 2, 1 - b[x]^2/a^2] + (3 b[x]^2)/(
4 a^3) Hypergeometric2F1[3/2, 5/2, 3, 1 - b[x]^2/a^2];
uba = (3 b[x])/(4 a^2) Hypergeometric2F1[3/2, 3/2, 3, 1 - b[x]^2/a^2];

L = 2;
R1 = 1;
R2 = N[Sqrt[R1^2 + 2 Rc L]];(* Sqrt[5]*)
Rc = 1;
a = r/r0;
r = 1;
r0 = y[x] + R1;

(*sol=NDSolve[{y'[x] == 1/b[x],
b'[x] == 1/ubb 1/(y[x] + R1) 1/b[x] (uba r/r0 - ub), b[0] == b00,
y[0] == 0}, {y[x], b[x]}, {x, 0, L}]
*)
 
  • #6
Goos, you need to do a little more than that dude. What would have been better is if you had taken my code up there and at least tried to accomplish what you wanted to do but first you'd have to study it to see exactly what is going on, then just try and change it slightly, just change maybe one variable a few times to see how it behaves. Then change some more of it. Work with it then post your code (in Cell/Convert To/Raw Input Form) so it's pasted without formatting code.
 

Related to Initial value problem for system of two diff. equation

1. What is an initial value problem for a system of two differential equations?

An initial value problem for a system of two differential equations is a mathematical model that represents the relationship between two variables, where the rate of change of one variable is dependent on the value of the other variable. The initial value problem specifies the values of both variables at a particular starting point, known as the initial condition.

2. How is an initial value problem for a system of two differential equations solved?

To solve an initial value problem for a system of two differential equations, you can use various methods such as separation of variables, substitution, or integrating factors. These methods involve manipulating the equations to isolate the dependent and independent variables and then using the initial conditions to find the specific values of the variables.

3. What are the applications of initial value problems for systems of two differential equations?

Initial value problems for systems of two differential equations have various applications in fields such as physics, engineering, and biology. They can be used to model real-world phenomena such as population growth, chemical reactions, and electrical circuits.

4. What is the significance of the initial condition in an initial value problem for a system of two differential equations?

The initial condition is a crucial part of an initial value problem for a system of two differential equations as it specifies the values of the variables at a particular starting point. Without the initial conditions, the solution to the system of equations may not be unique.

5. Can an initial value problem for a system of two differential equations have multiple solutions?

Yes, an initial value problem for a system of two differential equations can have multiple solutions. This can occur when the system of equations is nonlinear or when the initial conditions are not restrictive enough. In such cases, additional constraints or information may be needed to determine a unique solution.

Similar threads

Replies
8
Views
1K
  • Differential Equations
Replies
5
Views
1K
  • Differential Equations
Replies
2
Views
2K
Replies
64
Views
2K
Replies
7
Views
2K
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
1
Views
796
  • Differential Equations
Replies
2
Views
2K
  • Differential Equations
Replies
4
Views
1K
  • Differential Equations
Replies
3
Views
1K
Back
Top