Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Which numerical procedure to use

  1. Mar 28, 2014 #1
    I have a system of linear differential equations with known boundary conditions. First of all what is the general solution to such a system? I know it is exponentials with the eigenvalues, but I couldn't find any place where the exact full solution was stated.
    Second of all, I want to write a program in matlab that solves this set of linear differential equations. In general how am I better off:
    - Simulate the solutions numerically starting from scratch i.e. dy1 dy2, dt and everything are numerical quantities
    - Find eigenvalues to the coefficient matrix numerically, plug into the analytical solution (which is the one I am not completely sure off, but I think you can write up a general formula) and solve for the unknown constants by applying boundary conditions.
  2. jcsd
  3. Mar 28, 2014 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    That's because the description is too general for there to be a systematic way of finding the solution.
    i.e. the system may not have a solution.

    ... this sort of thing is the closest you'll get to a general approach to a solution.

    To do this in matlab, you'd construct the matrix A (see link) and then use Matlab's matrix tools to analyse it. i.e. eigs() will find the eigenvalues and vectors.
  4. Mar 29, 2014 #3
    But as far as I can see from the link you provided isn't the most general solution simply:

    x(vector) = c1 * eigenvector_1 * exp(eigenvalue_1 * t) + c2 * eigenvector_2 * exp(eigenvalue_2 * t) + ...

    So it is all about fitting that solution to the boundary conditions? Or am I wrong?
  5. Mar 29, 2014 #4

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    That's right.
    It's a bit like solving systems of linear equations... i.e. there may not be a unique solution, and so on.

    Looks like matlab has a symbolic differential equation solver that also does systems of equations.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook