|
An Implicit Differential Equation Example
Implicit
Mathematical Problems
solved with
Calculus Programming
- This section shows how to solve equations of
the following form:.
- Uxx
= f(x, U, Ux, Uxx, ...)
- This is a general form of an implicit
differential equation. To solve for Uxx in Calculus programming we add
the following code right after "model PDE" statement in these examples:
-
|
find Uxx; In ImplicitDE; ooo to match error
|
|
end
|
|
model
ImplicitDE
|
|
error = Uxx - f(x, U, Ux, Uxx, ooo)
|
|
error = error**2
|
This 'find'
statement will vary its parameters (ie. Uxx) until 'error' equals zero.
Thus you will have a value where
Uxx = f(x, U,
Ux, Uxx, ooo)
- Enjoy learning Calculus-level Programming!
An Implicit Differential Equation Example Source
Code:
-
For 1-dimensional (1D) Implicit Poisson
Equation use
following:
global all problem PoissonsPDE C ------------------------------------------------------------------------ C --- Calculus Programming example: Poisson's Equation; a PDE (1D) Initial C --- Value Problem solved. C ------------------------------------------------------------------------ C C User parameters ... ! rho = ... e0 = 8.854187817e-12 ! F/m or A2 s4 kg-1m−3 permittivity of free space ! ipoints = 10 ! grid pts. over x-axis C C x-parameter initial settings: x ==> i ! xFinal = 1: xPrint = xFinal/ipoints: ip = ipoints pi= 4*atan(1) C call xAxis ! end ! Stmt.s not necessary in IVP, but used in BVP versions model xAxis ! C ... Integrate over x-axis C x= 0: xPrt = xPrint: dx = xPrt / 10 ! U = ??? ! @ x = 0 Initiate janus; for PDE; ~ equations Uxx/Ux, Ux/U; of x; step dx; to xPrt do while (x .lt. xFinal) Integrate PDE; by janus if( x .ge. xPrt) then print 79, x, U, Ux, Uxx xPrt = xPrt + xPrint end if end do 79 format( 1h , f8.4, 2x, 10(g14.5, 2x)) end model PDE ! Partial Differential Equation find Uxx; in ImplicitDE; by ajax; to match error end model ImplicitDE error = (Uxx + rho/e0) * (1.23 + sin( Uxx * pi) - .543) ooo error = error**2 end
|
|
An Implicit Differential Equation Example Output:
-
o o o
--- AJAX SUMMARY, INVOKED AT ooo FOR MODEL ImplicitDE ----
CONVERGENCE CONDITION AFTER 1 ITERATIONS
UNKNOWNS CONVERGED
CONSTRAINTS SATISFIED
ALL SPECIFIED CRITERIA SATISFIED
LOOP NUMBER ......... [INITIAL] 1
UNKNOWNS
Uxx -5.000000E-01 -1.644488E-01
CONSTRAINTS
Error 1.049682E+00 6.404924E-17
---END OF LOOP SUMMARY
o o o
HTML code
for linking to this page:
- <a
href="http://www.digitalcalculus.com/math-problems/implicit-equation.html"><img
align="middle" width="100"
src="http://www.digitalcalculus.com/image/fc-win-icon.gif"/>
<strong>An Implicit Differential Equation Example</strong>
</a>; Simulation to Optimization, Tweak Parameters for Optimal
Solution.
Go to top
|
|