FC Coding is
One step from 1st Principles to Solution!


Example Boundary Value Problem:

Boundary Value Problems (BVPs)
solved with
Calculus Programming

Wikipedia comments: "Boundary value problems (BVPs) are similar to initial-value-problems (IVPs). A boundary value problem has conditions specified at the extremes ("boundaries") of the independent variable in the equation whereas an initial value problem has all of the conditions specified at the same value of the independent variable (and that value is at the lower boundary of the domain, thus the term "initial" value)."

This section shows how to solve equations of the following form:.

Uxx = f(x, U, Ux, ...)

This is a general form of a differential equation. To solve with the boundary values/conditions, Udesired & Uend, in Calculus programming we replace the following code for the "call xAxis" statement in these examples:

Udesired = 1.23e-3:   Uend = 9.87e-3  ! Initial Conditions (BCs)
error = 0: U0 = 1
find U0 In xAxis     ooo     to match error

plus, add some error statements thru out

error = error + (U - ???)**2

This 'find' statement will vary the 'U0' parameter until 'error' equals zero. Thus meeting your boundary conditions.

Enjoy learning Calculus-level Programming!

Example Boundary Value Problem Source Code:

A Boundary Value Problem:

      global all
      problem nonLinPDE
C ------------------------------------------------------------------------
C --- Calculus Programming example: non-linear PDE (1D) Boundary
C --- Value Problem solved.
C ------------------------------------------------------------------------
C User parameters ...
!       rho = ...
        e0 = 8.854187817e-12  ! F/m or A2 s4 kg-1m−3 permittivity of free space
C x-parameter initial settings: x ==> i
!       xFinal =  1:    xPrint = xFinal/20:    pi= 4*atan(1)
        Udesired = 1.23e-3:	Uend = 9.87e-3	! Initial Conditions (BCs)
	error = 0:	U0 = 1
        find U0;   in xAxis;    by mars;   to match error 
      model xAxis
C ... Integrate over x-axis
        x= 0:    xPrt = xPrint:      dx = xPrt / 10
        Initiate janus;  for PDE;
     ~       equations Uxx/Ux, Ux/U;  of x;  step dx;  to xPrt
!        Ux = ???	! @ x = 0 ... Ux at x=0 to be found as a BC
        U = U0
        do while (x .lt. xFinal)
          Integrate PDE;  by janus
          if( x .ge. xPrt) then
            print 79, x, U, Ux, Uxx
            xPrt = xPrt + xPrint
            if( x .eq. ???) then
              error = error + (U - Udesired)**2
            end if
          end if
        end do
        error = error + (U - Uend)**2
 79     format( 1h , f8.4, 2x, 10(g14.5, 2x))
      model PDE                         ! Partial Differential Equation
        Uxx = -rho/e0 * (1.23 + sin( Ux * pi) - .543) ooo	! your Diff Eq goes here

Example Boundary Value Problem Output:

selected output goes here ...  

HTML code for linking to this page:

<a href="http://goal-driven.net/math-problems/boundary-value-problem.html"><img style="float:left; width:100px" src="http://goal-driven.net/image/fc-compiler-icon.png"/> <strong>Example Boundary Value Problem</strong> </a>; Simulation to Optimization, Tweak Parameters for Optimal Solution.

Go to top

Valid CSS! Calculus (level) Problem-Solving for Engineers & Scientists

Textbooks - Parameter Estimation 4 ODE/PDE - Signal Analysis / Spectral Estimation - Body Plasma - Solar Cell
Increasing Productivity Examples: AC Motor Design - Matched Filters - Pulse Slimming / InterSymbol Interference - Pilot (safe) Ejection - PharmacoKinetics Simulation - Business Strategies & War Gaming - BVP - Implicit Equations