Thread: few questions for maths related programming ... ??

  1. #1
    Registered User delta's Avatar
    Join Date
    Oct 2015
    Posts
    39

    Wink few questions for maths related programming ... ??

    i was trying to learn programming for differential equations ...

    i was able to come up with a simple example for differential equation ...

    The (standard) calculus is broken into two pieces.

    i) Differential calculus - which is looking at the instantaneous rates of change of objects with respect to some variables. We have the notion of the derivative of a function.
    ii) Integral calculus - which is calculating the area under curves, calculating volumes and so on. This is all given in terms if the (indefinite or definite) integral of a function.

    The two notions are tied together via the fundamental theorem of calculus. This says that the derivative and indefinite integral are basically mutual inverses (but not quite)

    few questions for maths related programming ... ??-e17_4-png

    few questions for maths related programming ... ??-differential_equation_examples_33-png

    An equation containing the derivatives of one or more dependent variables, with respect to one of more independent variables, is said to be a differential equation
    i have a few doubts about declaring f(x) ... theta , d^2y/dx^2 ...

    then i saw this page on the internet .. i do not have this book ...

    few questions for maths related programming ... ??-books-jpg

    could somebody please tell me the right methods to declare

    f(x) ... theta , d^2y/dx^2 ...

    ??
    Last edited by delta; 07-03-2016 at 01:43 AM.

  2. #2
    Registered User
    Join Date
    Dec 2015
    Posts
    112
    Developing differential equations is going to be a very involved process. The example purposely choose a simple function to mimic.

    You might have luck looking for a differential equation library out there or unless you want to code this up, you can keep searching for the source code of differential equation library.

  3. #3
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413

  4. #4
    Registered User delta's Avatar
    Join Date
    Oct 2015
    Posts
    39
    Quote Originally Posted by CodeSlapper View Post
    Developing differential equations is going to be a very involved process. The example purposely choose a simple function to mimic.

    You might have luck looking for a differential equation library out there or unless you want to code this up, you can keep searching for the source code of differential equation library.

    thanks .. there seems to be many types of differential equations ...



    first order differential equations
    second order differential equations
    higher order differential equations ...
    linear differential equations
    separable differential equations
    exact differential equations
    homogeneous differential equations
    non homogeneous differential equations
    using the method of undetermined coefficients ...
    partial differential equations ...

    i am also familiar with some numerical methods associated with solving differential equations ...



    Solution by Taylor's series
    Picard's method of successive approximations
    Euler's method
    Modified Euler's Method
    Runge-Kutta method
    Predictor-Corrector Methods
    Adams-Moulton Method
    Milne's method

    and i also found this really good definition of differential equation ...

    An equation containing the derivatives of one or more dependent variables, with respect to one or more independent variables, is said to be a differential equation
    but my problem right now is that i am confused with the terms like ,
    dependent variables and independent variables in an equation ...

    once i have a clear understanding of that i can move to solving a not so hard looking equation like this one ...

    few questions for maths related programming ... ??-differential_equation_examples_33-png


    few questions for maths related programming ... ??-books-jpg


    i also have confusions about declaring

    f(x) ... theta , d^2y/dx^2 , (dy/dx)^3... properly in a programming language like c ...







    looks a bit more advanced to me ...

    also looks a bit more complicated than the programming language itself that i am familiar with ...

    thanks for sharing ...

    but ,let me see if i can solve this with the familiar c programming language itself ...

  5. #5
    Registered User
    Join Date
    Dec 2011
    Location
    Namib desert
    Posts
    90
    You might have a look at Numerial Recipes in C.

    It is a standard work and you have to pay for it.
    You can get a free guest account and thus get limited access or you can get free access to their older editions (http://apps.nrbook.com/c/index.html).

  6. #6
    Registered User
    Join Date
    Dec 2015
    Posts
    112
    If you are having trouble understanding differential equations I would start from there. There is usually entire college courses dedicated to them and the only real world application I ever used them in was with circuits.

    You can't do real differentiating on a computer but you can get a really good approximation. From what I've read on the web numerical recipes is a good book but has issues with copyright.

  7. #7
    Registered User delta's Avatar
    Join Date
    Oct 2015
    Posts
    39
    Quote Originally Posted by ddutch View Post
    You might have a look at Numerial Recipes in C.

    It is a standard work and you have to pay for it.
    You can get a free guest account and thus get limited access or you can get free access to their older editions (http://apps.nrbook.com/c/index.html).
    i have gone through that book before somehow ... that was some time ago .... but the book lacks some sort of order ...

    i was trying to follow these two instead ...

    for some understanding of the overall mathematics , before trying to do programming ...

    http://www.universityofcalicut.info/...al_methods.pdf

    for programming some maths related things , i would recommend this book ...

    Computer Fundamentals and Programming in C - J.B. Dixit










    Quote Originally Posted by CodeSlapper View Post
    If you are having trouble understanding differential equations I would start from there. There is usually entire college courses dedicated to them and the only real world application I ever used them in was with circuits.

    You can't do real differentiating on a computer but you can get a really good approximation. From what I've read on the web numerical recipes is a good book but has issues with copyright.

    yes i should try to improve my maths a little bit more ...before i try to program .. because i have some doubts still left about some basic operations like separation of variables ...

    may i ask what sort of differential equations are involved in circuits ??

    when you mean circuits ... do you mean things like micro controllers ??

    then is it also about things like generating waves ??

  8. #8
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    From what I remember of Calculus (I'm not sure of Differential Equation) it is like Sum to infinity, Area under a curve, etc. That is not too hard to do in Borland Turbo C 2.01. The only problem is it is going to be a close approximation like someone said. First you find the formula for the curve you need. Then you add an area of a section until it completes the curve. That is the approximation.

  9. #9
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    663
    Quote Originally Posted by Tien Nguyen View Post
    ... That is not too hard to do in Borland Turbo C 2.01. ...
    You keep mentioning this extremely outdated C compiler first released on 11-May-1989! I doubt that it even fully implements the C Programming Standard, C89/90, let alone C99 or C11, plus it contains non-standard functions, such as those provided by conio.h, VERY Windows specific, and should NOT be used, period.

    There are many more modern compilers available:

    Cygwin (My Recommendation)
    MinGW
    Pelles

    In addition to these three excellent choices, other free C compilers are listed here.

    Time to move up to one of these free compilers.

  10. #10
    Registered User delta's Avatar
    Join Date
    Oct 2015
    Posts
    39
    Quote Originally Posted by Tien Nguyen View Post
    From what I remember of Calculus (I'm not sure of Differential Equation) it is like Sum to infinity, Area under a curve, etc. That is not too hard to do in Borland Turbo C 2.01. The only problem is it is going to be a close approximation like someone said. First you find the formula for the curve you need. Then you add an area of a section until it completes the curve. That is the approximation.

    well its something like this ...

    for example , for a polynomial ...

    a solution of a polynomial equation is also called a root of the polynomial ...

    a value for the variable that makes the polynomial zero

    if you can't find an exact expression, then you can use numerical methods to get approximations ...

    with numerical methods you can choose how close to zero you want, and it will give you a value that's at least that close ...
    i personally like Dev c++ ...

    few questions for maths related programming ... ??-85e7c3b-jpg

    few questions for maths related programming ... ??-index-jpg


    this is where you start declaring the alphabets , variables , arrays ... etc ...

    even my original question was , how to declare ...

    few questions for maths related programming ... ??-books-jpg

    f(x) ... theta , d^2y/dx^2 , (dy/dx)^3... properly in a programming language like c ...
    Last edited by delta; 07-04-2016 at 10:28 AM.

  11. #11
    Registered User
    Join Date
    Dec 2015
    Posts
    112
    5. Application of ODEs: Series RL Circuit

    I've used it for RC constants.

  12. #12
    Registered User delta's Avatar
    Join Date
    Oct 2015
    Posts
    39
    thanks

    i myself was after some sort of wave generating circuits , or micro controllers ...

    you know these WiFi signals type , that generates electromagnetic waves...but could not find anything proper...

    do you know anything about that sort of circuits or micro controllers??

    i have some improvements to do on the subject of differential equations itself and the separation of variables ...

    i can only touch this subject after improving that parts ...
    Last edited by delta; 07-05-2016 at 02:21 AM.

  13. #13
    Registered User
    Join Date
    Dec 2015
    Posts
    112
    Oh man, that is a lot to this.

    For a wi-fi signal you need to understand signal modulation. In a Wi-Fi signal there is likely phase and frequency modulation, but that can be taken care of for you with a wifi chip.

    In order to make a board, you need to understand impedance, grounding, power, etc. and that is a huge undertaking.

    I really think you need to give it some good thought on what exactly you want to do and focus in on an area.

  14. #14
    Registered User delta's Avatar
    Join Date
    Oct 2015
    Posts
    39
    thanks ...

    i got interested in a bit of electronics ... after watching a video like this ...

    "LEARN ROBOTICS - build microcontroller"

    LEARN ROBOTICS - build microcontroller - YouTube
    i find that very interesting ... i was also looking for a video where electromagnetic radio waves are generated with the help of circuits or micro controllers ... i think it would be nice to learn about some radio wave generation in the future....

    anyway back to mathematics ...

    after that i will try to come back with some programming questions ...
    Last edited by delta; 07-05-2016 at 09:43 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 06-20-2016, 11:53 AM
  2. Maths For Game Programming?
    By kolliash in forum Game Programming
    Replies: 13
    Last Post: 09-18-2008, 11:53 AM
  3. Maths Programming Help
    By UPNPAD in forum C++ Programming
    Replies: 8
    Last Post: 04-25-2007, 05:51 PM
  4. Is maths REALLY required for programming?
    By FloatingPoint in forum A Brief History of Cprogramming.com
    Replies: 29
    Last Post: 07-12-2003, 01:18 PM
  5. non program related questions about C
    By Nova in forum C Programming
    Replies: 3
    Last Post: 10-16-2001, 03:42 PM

Tags for this Thread