1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Solving a System of 2 ODES with Interval conditions

  1. Nov 30, 2016 #1
    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

    3. The attempt at a solution
    Mod note: Added code tags.
    My code so far:
    Code (Matlab M):

    %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)-((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: Dec 5, 2016
  2. jcsd
  3. Dec 5, 2016 #2
    Thanks for the thread! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post? The more details the better.
  4. Dec 5, 2016 #3


    Staff: Mentor

    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:
    but in your code you have this:
    Code (Matlab M):
    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
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted