Trying to solve a system of ODEs

  1. The problem statement, all variables and given/known data
    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.
  2. Relevant equations
    The equations I am given are:


and the boundary conditions are:

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

  1. The attempt at a solution

My code so far:

%Mechanical Properties of Material
%Constants A,B,C,D in the Equations
a11= (1/E);
a12= (-nu/E);
a33= (1/E);
A= (a12)/(a11+a12);
B= ((a33)-((2a12^2)/(a11+a12)));
C= (a11)/(a11^2-a12^2);
D= (2
%Defining the System of 2ODES
syms x(t) y(t)
eqns = [diff(x,t)==A(x/t)+By, diff(y,t)==-C(x/t^2)-Dy];
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.


  • Two solutions I can offer:
    1) Check your equations to make sure they match the assignment. As far as you have written, you have "dy/dt=C(x/t^2)+D(y/t)" from the assignment but wrote "diff(y,t)==-C(x/t^2)-Dy" in the code (note the negatives).

    2) Make sure your syntax for MATLAB is correct. Remember that the statement "Ax + By" turns into "Ax + By" when coding. In the first case, MATLAB understands that you have two variables, Ax and By. In the second case, MATLAB understands you have two variables (x and y) and two defined constants (A and B).

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion