What is Functional: Definition and 414 Discussions

In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map values to other values, rather than a sequence of imperative statements which update the running state of the program.
In functional programming, functions are treated as first-class citizens, meaning that they can be bound to names (including local identifiers), passed as arguments, and returned from other functions, just as any other data type can. This allows programs to be written in a declarative and composable style, where small functions are combined in a modular manner.
Functional programming is sometimes treated as synonymous with purely functional programming, a subset of functional programming which treats all functions as deterministic mathematical functions, or pure functions. When a pure function is called with some given arguments, it will always return the same result, and cannot be affected by any mutable state or other side effects. This is in contrast with impure procedures, common in imperative programming, which can have side effects (such as modifying the program's state or taking input from a user). Proponents of purely functional programming claim that by restricting side effects, programs can have fewer bugs, be easier to debug and test, and be more suited to formal verification.Functional programming has its roots in academia, evolving from the lambda calculus, a formal system of computation based only on functions. Functional programming has historically been less popular than imperative programming, but many functional languages are seeing use today in industry and education, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, Elixir, OCaml, Haskell, and F#. Functional programming is also key to some languages that have found success in specific domains, like JavaScript in the Web, R in statistics, J, K and Q in financial analysis, and XQuery/XSLT for XML. Domain-specific declarative languages like SQL and Lex/Yacc use some elements of functional programming, such as not allowing mutable values. In addition, many other programming languages support programming in a functional style or have implemented features from functional programming, such as C++11, Kotlin, Perl, PHP, Python, Go, Rust, Raku, Scala, and Java (since Java 8).

View More On Wikipedia.org
  1. J

    How Can I Find the Equation for a Functional Taylor Expansion?

    Hello, Is there any place I can find the equation for the Taylor expansion of a functional around a function ?? Particularly, I want something like: f[x(t)] = f[\hat{x}(t)] + (f[\hat{x}(t)] - f[x(t)] \frac{\delta f}{\delta x(t)}|_{x(t)=\hat{x}(t)} + \frac{(f[\hat{x}(t)] -...
  2. A

    Functional Analysis: Basic Research & Ramsey Theory Applications

    Where can I get a very basic introduction to the current research directions in functional analysis? I have done a basic course in it. Also I am interested in knowing about applications of Ramsey theory to functional analysis. Thanks.
  3. Z

    Solving Functional Equation Homework

    Homework Statement Is the solution correct Homework Equations The Attempt at a Solution all are in the file
  4. D

    Determining Functional groups - carboxylic acid, ester etc

    Homework Statement What functional groups are present based on the compound's names? A. Methyl Hydroxybenzoate B. 2-Hydroxypropanoic acidHomework Equations The Attempt at a Solution We've learned about the basic Hydrocarbon derivatives in class, but only dealing with problems like...
  5. F

    Functional diffential-integral equations

    I'm reading Quantum Field Theory Of Point Particles And Strings, by Brian Hatfield, chapter 9 called Functional Calculus. But he seems to assume some famiality with the subject. I'm intriqued by his notation. He uses notation for functional derivatives almost as if it were ordinary derivatives...
  6. P

    Functional optimization problem

    Homework Statement Maximize the functional \int_{-1}^1 x^3 g(x), where g is subject to the following conditions: \int^1_{-1} g(x)dx = \int^1_{-1} x g(x)dx = \int^1_{-1} x^2 g(x)dx = 0 and \int^1_{-1} |g(x)|^2 dx = 1. Homework Equations In the previous part of the problem, I computed...
  7. maverick280857

    Four Point Correlation function from Generating Functional

    Hi everyone, I'm working through Section 9.2 (Functional Quantization of Scalar Fields) from Peskin and Schroeder. I have trouble understanding the absence of a term in equation 9.41 which I get but the authors do not. Define \phi_i \equiv \phi(x_i), J_{x} \equiv J(x), D_{xi} \equiv...
  8. maverick280857

    Functional Quantization of Scalar Fields

    Hi everyone, I'm reading section 9.2 of Peskin and Schroeder, and have trouble understanding the origin of a term in the transition from equation 9.26 to 9.27. Specifically, equation 9.26 is \frac{1}{V^2}\sum_{m,l}e^{-(k_m\cdot x_1 + k_l\cdot x_2)}\left(\prod_{k_{n}^{0}>0}\int d \Re...
  9. S

    What Functions Satisfy This Absolute Value Definition on the Rationals?

    Homework Statement Suppose we define an absolute value on the rationals to be a function f: Q -> Q satisfying: a(x) \geq 0 for all x in Q and a(x) = 0 \Leftrightarrow x = 0 a(xy) = a(x)a(y) for all x,y in Q a(x + y) \leq a(x) + a(y) for all x,y in Q Determine all such functions and prove they...
  10. G

    Dimensional alalysis to show functional dependence

    Homework Statement Use the method of dimensional analysis to show that the functional dependence in equation (1) can be derived from an observational expression: lambda = k*mu*f^m*T^n. Homework Equations lambda=k\sqrt {{\frac {T}{\mu}}}{f}^{-1} (1) lambda = k*mu*f^m*T^n \mu={\frac...
  11. C

    Maximizing a functional when the Euler-Lagrange equation's solution violates ICs

    Hi, I am trying to minimize: \int_0^\infty{\exp(-t)(t\,f'(t)-f(t))^2\,dt} by choice of f, subject to f(0)=1 and f'(x)>0 for all x. The (real) solution to the Euler-Lagrange differential equation is: f(t)={C_1}t rather unsurprisingly. However, this violates f(0)=1. If...
  12. I

    Help for zeta functional equation

    hi, i'm studying the functional equation of riemann zeta function for Re(s)>1; my book(complex analysis by T. Gamelin) use contour integral in the proof, where the contour is taken on the usual 3 curves (real axis and a small circle C\epsilon around the origin). I'm not able to figure why...
  13. R

    Linear functional clarification (from rudin)

    In Rudin's Functional Analysis (in theorem 3.4), he says: "every nonconstant linear functional on X is an open mapping". X is topological vector space. This seems like a strengthening of the open mapping theorem, which requires X to be an F-Space, and that the linear functional to be...
  14. W

    Functional analysis textbook recommendation needed

    Could any of you recommend a functional analysis textbook? I have looked at "Methods of modern mathematical physics" by Reed&Simon, but they assume a pure-maths BSc background, thus this book is not ideal for me. About my background: I have an Applied Physics BSc and starting a Theoretical...
  15. E

    Functional Analysis, Show that the range of a bounded linear operator

    Homework Statement Show that the range \mathcal{R}(T) of a bounded linear operator T: X \rightarrow Y is not necessarily closed. Hint: Use the linear bounded operator T: l^{\infty} \rightarrow l^{\infty} defined by (\eta_{j}) = T x, \eta_{j} = \xi_{j}/j, x = (\xi_{j}). Homework Equations...
  16. R

    Is R^w a first category topological vector space?

    This is from Rudin, Functional Analysis 2.1. Not homework. If X is an infinite-dimensional topological vector space which is the union of countably many finite-dimensional subspaces, prove X is first category in itself. What about this example? Take R^n (standard n-dimensional space of...
  17. CFDFEAGURU

    Functional Example in Gravity: Exploring the Lagrangian and Its Applications

    Hello all, I have been trying to fill in the gaps in the example of a functional given in chapter 3 of Hartle's book "Gravity" and I am not having much luck. I exhausted wikipedia for help to no avail. Does anyone know of or can provide a good simple example of a functional or just the...
  18. M

    Solving a Functional Equation - Muzialis

    Hi All, I am asked to produce a function such that, literally, increasing the indipendent variable by lambda will produce an increase in the function of a*lambda. I thought about setting up an equation as follows y(lambda*x)=a*lambda*y(x) In general a simple solution of the...
  19. R

    Functional Equation (Probably needs a CAS)

    Homework Statement If f'(x)>0 for all real positive x, where f:R+ ---> R and f(x)+(1/x)=f-1(1/(f(x))), f-1(1/(f(x)))>0 for all x>0. Find all the possible values of (i) f(2),(ii) f'(2) and (iii) Limit (x f(x)) as x ----->0 . The Attempt at a Solution Guessing from the last...
  20. C

    Generating functional (or partition function)

    I am reading a book (Di Francesco's "CFT", pg 337) in which it is given that if we take the operator that translates the system along some direction (which is a combination of time and space) as 'A', then the partition function is just trace(A). How do we get this?
  21. R

    Solve Functional Equation & Find Limit: f(x+y)=(f(x)+f(y))/(1+f(x)f(y))

    Homework Statement Suppose a function satisfies the conditions 1. f(x+y) = (f(x)+f(y))/(1+f(x)f(y)) for all real x & y 2. f '(0)=1. 3. -1<f(x)<1 for all real x Show that the function is increasing throughout its domain. Then find the value: Limitx -> Infinity f(x)xThe Attempt at a Solution I...
  22. A

    Extension of a Functional

    Homework Statement I am to illustrate a particular theorem by considering a functional f on R^2 defined by f(x)=\alpha_1 \xi_1 + \alpha_2 \xi_2, x=(\xi_1,\xi_2), its linear extensions \bar{f} to R^3 and the corresponding norms. I'm having a couple problems with this problem. For one, I...
  23. Z

    Functional Equation for $\sum_{n=0}^{N}n^{k}$

    is there a functional equation for \sum_{n=0}^{N}n^{k}=Z(N,k) where k and N are real numbers, in case N tends to infinite we could consider the functional equation of Riemann zeta but what happens in the case of N finite ??
  24. MathematicalPhysicist

    Proving the Airy Functional Equation: A Challenge in Complex Analysis

    I want to show that: Ai(x)+jAi(jx)+j^2Ai(j^2x)=0, where: Ai(x)=\int_{-i\infty}^{i\infty}e^{xz-z^3/3}dz and j=e^{2i\pi/3}, so far I got that I need to show that: e^{zx}+je^{jxz}+j^2e^{xzj^2}=0 but didn't succeed in doing so. Any hints?
  25. L

    Variational Calculus - Proving a functional has no broken extremals?

    Homework Statement Hi, I am in a variational calculus class and am working on a homework and need a bit of help with two of the problems. the first one is to prove that the functional: J(u)= \int (A u'^2 + B u u' + C u^2 + D u' + E u) dx where A,B,C,D,E are constants and A \neq 0 has no...
  26. E

    Functional Analysis (Big Rudin)

    I had a quick question on a part of a proof in chapter 1 of Functional Analysis, by Professor Rudin. Theorem 1.10 states "Suppose K and C are subsets of a topological vector space X. K is compact, and C is closed, and the intersection of K and C is the empty set. Then 0 has a...
  27. P

    Integration on the way to Generating Functional for the free Dirac Field

    Hi, if I want to calculate the generating functional for the free Dirac Field, I have to evaluate a general Gaussian Grassmann integral. The Matrix in the argument of the exponential function is (according to a book) given by: I don't understand the comment with the minus-sign and the...
  28. P

    Generating Functional for Yukawa Interactions

    Hello, I want to derive the connected two point function for the interacting boson-fermion theory. I know that the generating functional is Z(J, \overline{\eta}, \eta) = N \; exp \left( \int d^4 z \; L_{int} \left(-i \frac{\delta}{\delta J(z)} \right) \left(-i \frac{\delta}{\delta...
  29. Shackleford

    Elements of the Theory of Functions and Functional Analysis

    I'm thinking about getting this book. I'm a physics major, and I think the only analysis course I'm required to take later as a prerequisite for graduate courses is Introduction to Complex Analysis. So far, I've taken Cal I-III and Linear Algebra. Differential Equations will probably be in the...
  30. J

    PHP PHP -OO or Functional for speed/ knowledge demonstration?

    My second PHP question this week...:smile: I'm writing a PHP app which includes things such as form validation and database interaction. So far, almost everything has been written procedurally. However, I started playing around with PHP's OO stuff, and it's cool. Problem is, this app is being...
  31. J

    Functional Integral in Free-Field Theory: Understanding the Derivation

    In free-field theory, the functional integral \int \mathcal{D}\varphi \exp\left(i \frac{1}{2} \int d^4 x (\partial_\mu \varphi \partial^\mu \varphi - m^2 \varphi^2)\right) can be done exactly (see e.g., Peskin and Schroeder p. 285). I'm tyring to understand the step in their derivation...
  32. H

    Programs Functional Programming Degree in North America?

    Can you recommend me some low-cost universities in Canada(or US) that specialise in functional programming? I am looking for Bachelor Degrees. I have noticed that many interesting stuff, that I would call functional proramming, are in degrees such as electrical engineering and computer science...
  33. S

    Functional relation between different functions of(x,y,z)

    Homework Statement I have two scalar functions u(x,y,z) and v(x,y,z) which are differentiable..Now it is required to prove that a necessary and sufficient condition for these two to be functionally related by equation F(u,v)=0 is [\nablau] \times [\nablav]=0 The Attempt at a Solution...
  34. R

    Functional analysis book for engineers

    Hello, I am currently looking for a book on functional analysis. However most books I have seen assume knowledge real and complex analysis. But I am looking for a more superficial introduction covering the important results, some examples of applications (mainly to computational problems)...
  35. E

    Functional Groups: Examples of Esters & Ethers

    Could someone please give me an example of an ether and an ester. In words, not drawing them. Thank you!
  36. Andy Resnick

    Functional Analysis for Differential Equations: Entry-Level Guide

    I'm looking for a entry-level book discussing the application of functional analysis to differential equations- mostly the Navier-Stokes equation, but PDEs in general. The books I have or have seen are either math books, full of proofs and definitions without application, or physics papers...
  37. D

    Functional analysis and limits

    Homework Statement http://img357.imageshack.us/img357/8695/38808719uw6.png Homework Equations \lim_n a_n := \lim_{n \rightarrow \infty} a_n The Attempt at a Solution I'm stuck at exercise (c). Since if n heads to infinity the m doesn't play the role the limit must be one. So...
  38. M

    Where can I find challenging functional analysis problems for self-study?

    Does anyone know of where I should look to find lots of good functional analysis problems? I am currently reading Kreyszig which has great commentary, but the majority of the exercises are simple.
  39. T

    Dimensions and the Generating Functional

    Something seems a little weird to me: What are the dimensions of a generating functional, Z[j] -- say for real scalar field theory? Z[j]=\int\mathcal{D}\phi\,\exp\, i\!\int d^4x\left(\frac{1}{2}\partial_\mu\phi\partial^\mu\phi-\frac{1}{2}m^2\phi^2+j\phi\right) Also, what about mass dimensions...
  40. R

    Stargazing Help get my telescope functional?

    I've had a Meade DS 114 for a while. My kids dismantled it and apparently a piece is missing. The focuser tube is 2"; my eye pieces are 1.25" Meade says there was a piece which adapted the 1.25" eye pieces for use in the 2" hole (which also allowed for use of 2" eye pieces I guess). My...
  41. J

    Chain rule with functional derivative

    Given that F = \int{f[h(s),s]ds} does \frac{\partial}{\partial h}ln(F)=\frac{1}{F}\frac{\delta F}{\delta h}=\frac{1}{F}\frac{\partial f}{\partial h} ?
  42. A

    Is the numerical value of action functional of any importance?

    While working out a problem I got a result which gave rise to this doubt regarding value of action functional. Suppose I start from an action, obtain the equation of motion and when I try to check if that solution gives a finite value of action, I get, surprisingly, vanishing value. The actual...
  43. K

    Basic density functional theory

    I try to learn DFT by myself(Kohn-Sham Equations), but the concept is still not so clear for me. So far, if I start with assuming any density, and then I would be able to find V(KS) Then I use this hamiltonian and solve for a wave function. And I use this wave function to find another...
  44. J

    A functional that depends on an integral?

    Is it possible to find the extrema of an integral equation if the integral depends on a variable and an integral of that variable, i.e. the integrand is f(x) * g(integral(x)). I'm not sure if this is a "nonlocal" functional, or not a functional at all, but I can't find any references that...
  45. J

    What is the result of Fourier transformation of functional theta function?

    what is the result of Fourier transformation of functional theta [Heaviside] function?
  46. H

    Adjoint of functional derivative

    In the space of Riemannian metrics Riem(M), over a compact 3-manifold without boundary M, we have a pointwise (which means here "for each metric g") inner product, defined, for metric velocities k^1_{ab},k^2_{cd} (which are just symmetric two-covariant tensors over M)...
  47. H

    Adjoint of functional derivative in superspace

    In the space of Riemannian metrics Riem(M), over a compact 3-manifold without boundary M, we have a pointwise (which means here "for each metric g") inner product, defined, for metric velocities k^1_{ab},k^2_{cd} (which are just symmetric two-covariant tensors over M)...
  48. J

    Chain rule with functional derivative

    This is supposedly the chain rule with functional derivative: \frac{\delta F}{\delta\psi(x)} = \int dy\; \frac{\delta F}{\delta\phi(y)}\frac{\delta\phi(y)}{\delta\psi(x)} I have difficulty understanding what everything in this identity means. The functional derivative is usually a derivative...
  49. B

    Conjugate points of extermals of functional

    Show that the extermals of any functional of the form integ (a->b) F(x,y') dx have no conjugate points. Not sure how to start this question, any help would be appreciated
Back
Top