Solving Boundary Value problems via Orthogonal Collocation

Поділитися
Вставка
  • Опубліковано 30 жов 2024

КОМЕНТАРІ • 18

  • @thomashietala3815
    @thomashietala3815 Рік тому +2

    Hi Kevin, thanks for the video. Have you made some video where you apply this method when one of the boundary conditions is in the first derivative? (like dy/dx=0 at x=0) I looked through your videos and couldn't find it. I can't really figure out how to apply this methodology in that case.
    Also, there is another youtube page (APMonitor) that has done videos about the orthogonal collocation application, however, he does it in a different way, I don't know if you are familiar with his videos, however, if you are, could you tell me if the methodology is essentially the same, or if it is really different methods?
    Thank you in advance

    • @kpmooney
      @kpmooney  Рік тому +1

      I didn't do a specific video on it, but it is done in the same way. Just alter the boundary equation to be the derivative of the polynomial rather than the polynomial itself.

  • @optimizacioneningenieria3385
    @optimizacioneningenieria3385 2 роки тому +1

    Thanks. The boundary conditions should not contain the second derivative. 👍

  • @AJ-et3vf
    @AJ-et3vf 3 роки тому

    Thank you so much for this sir. The solve_bvp function in SciPy uses a collocation algorithm, probably similar to this.
    I also manually implemented the collocation method using SymPy to generate the the polynomial approximation and the resulting system of linear (or nonlinear) equations. If non-linear, I also solve for the jacobian analytically and conveniently using SymPy. I convert them to standard Python functions with SymPy's lambdify and use the SciPy root function to solve the system of nonlinear equations.
    I have done these using 5th, 7th, and 9th order polynomials. Pretty fun to do in Python since the symbolic part of things are handled with Sympy, not requiring any pen or paper.
    The collocation points I choose are usually linearly equally spaced points in between the boundaries.
    Edit: I highly appreciate your use of functions the NumPy polynomial sub packages btw! I've never used those and it's good to be exposed and see them used. Also the numpy matlib repmat function!

    • @toyayaone5258
      @toyayaone5258 2 роки тому

      Would you mind share your work?

    • @sharonorji3561
      @sharonorji3561 Рік тому

      Wow this is very impressive. Please have you solve with differential equations as boundary conditions. If you have, please can you tell me how to do it

  • @sharonorji3561
    @sharonorji3561 Рік тому

    Hi Kevin. Thank you for your video. I will appreciate if you reply to my comments earlier. Please how will I code for boundary condition with derivative. Also do you know about partial derivatives with orthogonal collocation method. Thank You

    • @kpmooney
      @kpmooney  Рік тому

      You handle the derivative the same way as in the video. (x1 - x0) / delta = whatever. I don't have the time to do a specific video on it, unfortunately. I have a video on orthogonal collocation. Just search the channel.

    • @sharonorji3561
      @sharonorji3561 Рік тому

      @@kpmooney Thank You so much for your reply. The boundary conditions goes with everything in the matrix after inputing the roots. For example, dc/dz=Pe(c-1). The dc/dz is the matrix with the legendre roots. Please how do I code it, is there a platform where I can send a message because I really end your help. Thank You

    • @sharonorji3561
      @sharonorji3561 Рік тому

      @@kpmooney need*

    • @kpmooney
      @kpmooney  Рік тому

      The derivative boundary conditions would be in the B matrix mentioned in the video. You would (using my code variables) change DE[0] and DE[-1] to reflect the first and last rows of B. Then change knowns[0] and knowns[-1] to be the value of the boundary conditions.

    • @sharonorji3561
      @sharonorji3561 Рік тому

      @@kpmooney Thank You so much Kevin. Let me do this.

  • @Hawiyah_galery71532
    @Hawiyah_galery71532 5 місяців тому

    Where the source?

    • @kpmooney
      @kpmooney  4 місяці тому

      The link to the source code is in the video description.

  • @mangeshw9766
    @mangeshw9766 3 роки тому

    Thanks Kevin god bless 🌷.......Need Help Can u plz make one vedio on Fibonacci Retracment strategy to buy and sell on the important levels in python .....I search all way around but I can't find out vedio on the buy and sell .....plz help

    • @kpmooney
      @kpmooney  3 роки тому +2

      I’m not sure what you need. The Fibonacci retracement percentages are just numbers, some of them not even related to the Fibonacci sequence. Your trading platform would probably be a better and faster choice than programming something from scratch in Python. I really don’t do technical analysis so I wouldn’t be able to help you pick entry and exit points. Do you have a specific question about the math or programming that I could help with perhaps?

    • @mangeshw9766
      @mangeshw9766 3 роки тому

      @@kpmooney thanks for reply ...