Solving a System of 2 ODES with Interval conditions

In summary, the problem is that despite keying in all possible solutions, the user is not able to get numerical solutions for a system of 2 ordinary differential equations in MATLAB. The equations given are dx/dt=A(x/t)+By and dy/dt=C(x/t^2)+D(y/t), with boundary conditions y(1)=0 and y(1.2)=-100E6. The attempted solution involves defining the constants A, B, C, D and using the dsolve function, but the output returns empty symbols. Further help is needed to resolve this issue.
  • #1
Ketav
4
0

Homework Statement


I am trying to solve a system of 2 ordinary differential equations using matlab. However, I am not able to get numerical solutions from the code despite having keyed in all possible solutions.

Homework Equations


The equations I am given are:

dx/dt=A(x/t)+By
dy/dt=C(x/t^2)+D(y/t)

and the boundary conditions are:

y(1)=0; y(1.2)=-100E6

The Attempt at a Solution


Mod note: Added code tags.
My code so far:
Matlab:
%Mechanical Properties of Material
E=200e9;
nu=0.3;
P=100E6;
%Constants A,B,C,D in the Equations
a11= (1/E);
a12= (-nu/E);
a33= (1/E);
A= (a12)/(a11+a12);
B= ((a33)-((2*a12^2)/(a11+a12)));
C= (a11)/(a11^2-a12^2);
D= (2*a12+a11)/(a11+a12);
%Defining the System of 2ODES
syms x(t) y(t)
eqns = [diff(x,t)==A*(x/t)+B*y, diff(y,t)==-C*(x/t^2)-D*y];
cond = [y(1) == 0, y(1.2)==-P];
withSimplifications = dsolve(eqns, cond)
withoutSimplifications = dsolve(eqns, cond, 'IgnoreAnalyticConstraints', false)
[xSol(t), ySol(t)] = dsolve(eqns)

The answer is get is

Warning: Explicit solution could not be found.
> In dsolve (line 201)
In IsotropicThickWallCylinder (line 18)

xSol(t) =

[ empty sym ]ySol(t) =

[ empty sym ]
[

Would really appreciate some help.
 
Last edited by a moderator:
  • #3
Ketav said:

Homework Statement


I am trying to solve a system of 2 ordinary differential equations using matlab. However, I am not able to get numerical solutions from the code despite having keyed in all possible solutions.

Homework Equations


The equations I am given are:

dx/dt=A(x/t)+By
dy/dt=C(x/t^2)+D(y/t)

and the boundary conditions are:

y(1)=0; y(1.2)=-100E6

The Attempt at a Solution


Mod note: Added code tags.
My code so far:
Matlab:
%Mechanical Properties of Material
E=200e9;
nu=0.3;
P=100E6;
%Constants A,B,C,D in the Equations
a11= (1/E);
a12= (-nu/E);
a33= (1/E);
A= (a12)/(a11+a12);
B= ((a33)-((2*a12^2)/(a11+a12)));
C= (a11)/(a11^2-a12^2);
D= (2*a12+a11)/(a11+a12);
%Defining the System of 2ODES
syms x(t) y(t)
eqns = [diff(x,t)==A*(x/t)+B*y, diff(y,t)==-C*(x/t^2)-D*y];
cond = [y(1) == 0, y(1.2)==-P];
withSimplifications = dsolve(eqns, cond)
withoutSimplifications = dsolve(eqns, cond, 'IgnoreAnalyticConstraints', false)
[xSol(t), ySol(t)] = dsolve(eqns)

The answer is get is

Warning: Explicit solution could not be found.
> In dsolve (line 201)
In IsotropicThickWallCylinder (line 18)

xSol(t) =

[ empty sym ]ySol(t) =

[ empty sym ]
[

Would really appreciate some help.
There's a discrepancy between the system of DEs you wrote at the top of your post, and what you're using in your MATLAB code.

At the top of your post you have this:
Ketav said:
dx/dt=A(x/t)+By
dy/dt=C(x/t^2)+D(y/t)
but in your code you have this:
Matlab:
eqns = [diff(x,t)==A*(x/t)+B*y, diff(y,t)==-C*(x/t^2)-D*y];
The equation for dx/dt is the same in both places, but the equations for dy/dt are different (different signs on the right side, and y/t in one place, but only y in the other).

Other than this, I don't see anything obviously wrong with your code. Presumably you have looked at the documentation for dsolve here: https://www.mathworks.com/help/symbolic/dsolve.html
 

1. What are ODES and how are they used in scientific research?

ODES, or ordinary differential equations, are mathematical equations that describe the relationship between a function and its derivatives. They are used in scientific research to model real-world processes, such as chemical reactions, population growth, and physical systems.

2. How are systems of ODES solved?

Systems of ODES are typically solved using numerical methods, such as Euler's method, Runge-Kutta methods, or the finite difference method. These methods involve breaking down the system into smaller steps and approximating the solutions at each step.

3. What are interval conditions and why are they important in solving a system of ODES?

Interval conditions refer to the initial values or boundary conditions provided for a system of ODES. These conditions are important because they provide the starting point for solving the equations and help determine a unique solution.

4. Can a system of 2 ODES with interval conditions have multiple solutions?

Yes, a system of 2 ODES with interval conditions can have multiple solutions. This can occur when the system is non-linear or when the initial conditions are not specific enough to determine a unique solution.

5. What are some common challenges in solving a system of 2 ODES with interval conditions?

Some common challenges in solving a system of 2 ODES with interval conditions include finding appropriate numerical methods, dealing with non-linear systems, and ensuring the initial conditions are accurate and specific enough to determine a unique solution.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Math POTW for University Students
Replies
10
Views
1K
  • Differential Equations
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
949
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Back
Top