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. P

    Functional Derivative of Long Range Dipole Interaction Energy

    Homework Statement Dear all, Good day. I am currently working on the phase field modeling of ferroelectrics. For this reason, I need to find functional derivative of an expression as presented in attached picture 1. Then in picture 2, it shows the final form of equation that I am...
  2. L

    Calc I: Raising Limits to Functional Exponents

    Homework Statement Suppose ##f(x)## and ##g(x)## \rightarrow 0 as x \rightarrow 0+. Find examples of functions f and g with these properties and such that: a.) ## \lim_{x\rightarrow 0+} { f(x)^{g(x)} = 0 } ## Homework Equations None The Attempt at a Solution Let ## f(x) = 2^x-1...
  3. R

    Calculation boundary terms of a functional

    Dear all, I am stuck with the problem which is given below; In this problem the equilibrium equations of the given functional must be derived in u, v, and w directions from which the boundary terms must be found. I think that i have derived the equilibrium equations( 5 equations), but i...
  4. boneh3ad

    Recommended texts for self-study [real & functional analysis]

    Hello, I have been increasingly running into topics in my field where at least a basic faculty with real and functional analysis would be quite helpful and I would like to go about self-studying a bit in that area. I know that Rudin is the canonical text in the field, but I have also heard...
  5. Saitama

    Functional equation problem

    Homework Statement Let ##f:R^+ \rightarrow R## be a strictly increasing function such that ##f(x) > -\frac{1}{x} \, \forall \,x>0## and ##\displaystyle f(x)f\left(f(x)+\frac{1}{x}\right)=1 \, \forall \, x>0##. Find a. f(1) b. Maximum value of f(x) in [1,2] c. Minimum value of f(x) in [1,2]...
  6. G

    Functional analysis and real analysis

    In my schools functional analysis course, under prerequisites, it says "real analysis would be a good preparatory course, but is not required". In the concurrent real analysis thread, it was mentioned that real analysis is a stepping stone to functional analysis. I'm curious about two things...
  7. Saitama

    Finding f(2) - Functional equation question

    Homework Statement Let ##f\left(\frac{x+y}{2}\right)=\frac{f(x)+f(y)}{2}## for all real x and y. If f'(0) exists and equal -1 and f(0)=1, find f(2). Homework Equations The Attempt at a Solution Substituting y=0, 2f(x/2)=f(x)+1. This doesn't seem to be of much help. I don't see how...
  8. G

    MHB What is the probability density for a given exponential functional integral?

    Good day! I have a question regarding the law of the ff: $$ \int_0^t h(s) e^{2\beta(\mu(s) + W_s)} $$ where $\beta >0;$ $h,\mu$ are continuous functions on $\mathbb{R}_+$ with $h\geq 0;$ and $W=\{W_s,s\geq 0\}$ is a standard Brownian motion. Thanks for any help.:D
  9. K

    How can I prove that this 2D expression is always less than 1 for n≠β?

    Hello, While analysing the asymptotic value of a ratio of a bessel and a hankel function, I reduced it to something of the form [(1 + β/n)^ n * (1 + n/β)^ β] / 2^(n+β) ; n and β are integers and greater than 1 how do I show that the above expression is always less than 1, for n≠β...
  10. W

    How to learn functional analysis

    I major in physics, but I'm also very interested in mathematics, especially analysis. Until now, I have taken mathematical analysis and real analysis. Now, I want to learn functional analysis by myself, and my teacher adviced me to read topology first. But I found it difficult to understand and...
  11. C

    Functional or regular (partial) taylor series in Field theory

    When expanding a function (for example the determinant of the space-time metric g) as a functional of a perturbation from the flat metric ##h_{\mu \nu}##, i.e. ##g_{\mu \nu} = \eta_{\mu \nu} + h_{\mu \nu} ## i would think that the thing to do is to recognize that ##g_{\mu \nu}## and thus also...
  12. C

    Interpretation of the functional Z (in Zee).

    In Zee's book at page 12 in both editions he finds that he can write the amplitude $$\langle q_f|e^{-iHT} |q_i\rangle = \int Dq(t) e^{iS} $$ where T is the time between emission at ##q_i## and observation at ##q_f##. He then states that we often define $$Z = \langle 0 | e^{-iHT} |0...
  13. P

    Question on density functional theory

    Dear PF, I'm reading a book on DFT, and it says that only ground-state wave function is a unique functional of the ground-state density, n(r). However, if in DFT the potential, v(r), is a unique functional of n(r), then shouldn't all wave functions be functionals of n(r), because you can...
  14. A

    Can We Show Y=X If Y is a Subspace of X and Y^c is First Category?”

    Suppose that $$X$$ is a f-space and $$Y$$ is a subspace of $$X$$ and $$Y^{c}$$ is a first category in $$X$$. Can we show $$Y=X$$?
  15. M

    MHB Troubling contradiction in Functional Analysis

    Hello I was doing an exercise that said: "If $P$ is a continuous operator in a Hilbert space $H$ and $P^2=P$ then the following five statements are equivalent". The first statement was that P is an orthogonal projection. Now this was suposed to be equivalent, under the condition of $P^2=P$, to...
  16. V

    Using Density Functional Theory to make a Tight Binding model?

    Hi all, A professor asked me to do something, but I'm not quite sure what he means -- He asked me to use Density Functional Theory (DFT) calculations of the band structure of a certain crystalline metal and adjust the matrix elements of a Tight Binding (TB) model to make a "minimal" TB model...
  17. J

    MHB Bounded linear functional question? Real Analysis

    Consider the functional Tf = f(5) - i f(7). If we take the domain T to be C_0(ℝ) with supremum norm, is T a bounded linear functional? What if we take the domain to be C_c(ℝ) with L^2 norm || . ||_2?I know I should post what I have so far but this time I have no idea because I had to missed 2...
  18. S

    Linear algerba: trace of square matrix is a linear functional

    Lets define trace for each square matrix A its trace as sum of its diagonal elements, so tr_{n}(A)=\sum_{j=1}^{n}a_{j,j}. Now proove that trace is a linear functional for all square matrix. I would be happy to know what has to be true for anything to be a linear functional? If I...
  19. T

    How to find find all P(x) for this functional equation

    Homework Statement Find all the polynomials P(x) for which P(x^2+2x+3)=[P(x+3)]^2 Homework Equations The Attempt at a Solution I don't really know how to solve functional equations systematically. I tried to to find a linear P(x) and found P(x)=x-2 through trial & error. I also tried...
  20. F

    Role of real & functional analysis in physics?

    I know complex analysis is of immense help in physics at it aids us in calculating certain integrals much more easily. But what about real analysis and functional analysis? Are these branches of mathematical analysis of much use in physics? If so, in what branches of physics and how?
  21. C

    Splitting up of functional integral (Peskin and Schroeder)

    I'm reading about path integrals in Peskin and Schroeder's Introduction to Quantum field theory and there is a few things in the text which I find puzzling. At page 283 in the section about correlation functions we are considering the object (equation 9.15) \int D\phi(x) \phi(x_1) \phi(x_2)...
  22. A

    Imo small question about the functional equation

    Homework Statement as some of you might've done it this is the functional eqUATION FROM THE IMO 2012 / a + b + c = 0 f2(a)+f2(b)+f2(c)=2f(a)f(b)+2f(b)f(c)+2f(c)f(a). f:Z->Z http://www.cut-the-knot.org/arithmetic/algebra/2012IMO-4.shtml <- link of the problem and its SOLUTION now i worked with...
  23. A

    MHB Prove No Uniformly Convergent Subsequence: Functional Sequence

    SOLVED Prove that the functional sequence has no uniformly convergent subsequence -check n \in \mathbb{R}, \ \ f_n \ : \ \mathbb{R} \rightarrow \mathbb{R}, \ \ f_n(x) =\cos nx We want to prove that {f_n} has no uniformly convergent subsequence. This is my attempt at proving that: Suppose...
  24. Hercuflea

    Numerical analysis vs functional analysis vs statistics for engineerin

    Hey all, back with another question. I have the opportunity in the fall to choose 1 (maybe 2 if I'm lucky) of the following classes: Numerical analysis (undergrad numerical linear algebra, using matlab), Functional Analysis (as a directed study course with a prof), and the other is doing a...
  25. L

    What is the Functional Differentiation of F[y(x)] with Respect to y(x')?

    Homework Statement F[y(x)]=\int [y(x)\frac{dy(x)}{dx}+y(x)^{2}]\,dx Homework Equations δ(x-x') I think this is the Kronecker Delta. It might be the Dirac Delta. The Attempt at a Solution I have the whole thing written in my notes, I just don't know how to make sense of it...
  26. L

    How to do functional derivatives

    Here's an example from my homework. I already turned it in, though. I basically just copied what I could from my notes, but I have no idea how this is done. Could someone explain this to me? I can't find anything intelligible (at least to me) of this stuff on any website. My notes contain parts...
  27. D

    Functional analysis and topology books needed

    Hi folks ... I urgently need good books about Functional analysis and Topology. These must be comprehensive and thorough, undergraduate or graduate. Please, advise and provide your experiences with such books. I accept only thick books ;) e.g Introductory Functional Analysis with...
  28. L

    Convexity of a functional using the Hessian

    Homework Statement Consider the functional I:W^{1,2}(\Omega)\times W^{1,2}(\Omega)\rightarrow \mathbb{R} such that I(f_1,f_2)=\int_{\Omega}{\dfrac{1}{2}|\nabla f_1|^2+\dfrac{1}{2}|\nabla f_1|^2+e^{f_1+f_2}-f_1-f_2}dx. I would like to show that the functional is strictly convex by using the...
  29. micromass

    Analysis Functional Analysis by Reed and Simon

    Author: Michael Reed, Barry Simon Title: Functional Analysis Amazon link https://www.amazon.com/dp/0125850506/?tag=pfamazon01-20 Level: Undergrad
  30. micromass

    Analysis Essential Results of Functional Analysis by Zimmer

    Author: Essential Results of Functional Analysis Title: Robert Zimmer Amazon Link: https://www.amazon.com/dp/0226983382/?tag=pfamazon01-20
  31. micromass

    Analysis Functional Analysis by Riesz and Sz.-Nagy

    Author: Frigyes Riesz, Bela Sz.-Nagy Title: Functional Analysis Amazon link: https://www.amazon.com/dp/0486662896/?tag=pfamazon01-20
  32. Jameson

    MHB What is a function that satisfies the iterated functional equation $f(f(x))=-x$?

    I don't know what to title this but will change it if $f(f(x))$ has a name. Anyway, I need to find $f(x)$ such that $f(f(x))=-x$. My friend gave me this challenge question and I haven't been able to figure it out. There are many examples where $f(f(x))=x$ for example f(x)=\frac{1}{x} but that...
  33. micromass

    Analysis Functional Analysis by Stein and Shakarchi

    Author: Elias Stein, Rami Shakarchi Title: Functional Analysis: Introduction to Further Topics in Analysis Amazon Link: https://www.amazon.com/dp/0691113874/?tag=pfamazon01-20 Prerequisities: Real Analysis by Stein and Shakarchi Level: Undergrad Table of Contents: Foreword Introduction...
  34. micromass

    Analysis Real and Functional Analysis by Lang

    Author: Serge Lang Title: Real and Functional Analysis by Lang Amazon Link: https://www.amazon.com/dp/0387940014/?tag=pfamazon01-20 Prerequisities: Undergrad analysis Level: Grad Table of Contents: General Topology Sets Some Basic Terminology Denumerable Sets Zorn's Lemma...
  35. A

    Creating Input Files in Quantum Espresso: A Beginner's Guide

    I am a new user for Quantum Espresso(QE). Recently I have installed Quantum Espresso in my system. Now i am struggling to give input file in QE. How to generate input file in QE?
  36. micromass

    Analysis Introductory Functional Analysis with Applications by Kreyszig

    Author: Erwin Kreyszig Title: Introductory Functional Analysis wih Applications Amazon link https://www.amazon.com/dp/0471504599/?tag=pfamazon01-20 Prerequisities: Being acquainted with proofs and rigorous mathematics. Rigorous Calculus and Linear algebra. Level: Undergrad Table of...
  37. T

    Polar Coordinates functional notation.

    I've always been curious why points in polar coordinates are defined as (r,θ) when all equations (including parametric equations formed from them) are defined as r=f(θ). Considering that point in cartesian coordinates are defined as (x,y) where y=f(x). Also a,b=(r,θ) ∫1/2[f(θ)]2 further...
  38. MarkFL

    MHB Can You Solve This Challenging Functional Equation?

    A few days ago on MMF the following question was posted with no one showing how to solve it so far: Given: $\displaystyle f(f(x))=x^2-x+1\, \forall x\in \mathbb{R}$ find $\displaystyle f(x)$. I have never known how to solve such equations, except by trial and error, and this one has me...
  39. jfy4

    Propagator using Functional QFT

    Hi, I am trying to write down the propagator for a scalar field theory, but I want to try and get it in the functional representation. My plan is to compute the following: \langle \psi (x', t') | \psi (x,t) \rangle which gives the amplitude to go from x' to x. Now I guess I have to...
  40. J

    Minimizing a functional definite integral

    I have a definite integral defined by \begin{equation}T\left(G\left(g\right)\right)=\int_{g_{1}}^{g_{2}}G(g)\mathrm{d}g\end{equation} where G is a continuous function of a variable g, and g_{1} and g_{2} are known numbers. I want to minimize T\left(G\left(g\right)\right), that is I want to...
  41. R

    Simple Functional Derivatives

    Homework Statement Hey, can I just check these functional derivatives?: 1) \frac{\delta F[g]}{\delta g(y)} where F[g] = \int dx \left[ \frac{1}{\sqrt{1+(g'(x))^2}} - 2g(x) + 5 \right]\>. 2) \frac{\delta F[a,b,g]}{\delta g(y)} where F[a,b,g] = \int d^4x \left[ A(\partial_{\mu}...
  42. M

    Convergence of a functional series (analysis)

    Homework Statement Determine whether the following functional series is pointwise and/or uniformly convergent: \sum_{n=1}^\infty \frac{x}{n} (x\in\mathbb{R}) Homework Equations The Attempt at a Solution My answer to this seems very straightforward and I would be very grateful if...
  43. R

    Functional derivative expansion (from Chaikin)

    I'm self studying Chaikin's Principles of Condensed Matter Physics. I'm trying to figure out how to go from (5.2.30) to (5.2.31). Homework Statement 5.2.30 is the one-loop approx. to the free energy. I'll denote G0^-1 from the book G ~ Integral(ln(G(phi(x))) 5.2.31 is (as far as...
  44. T

    Functional analysis - task on convexity and dual spaces

    Homework Statement Let C be a non-empty convex subset of a real normed space (X,\|\cdot\|). Denote H(f,a):=\{x\in X: f(x)\leq a\} for f\in X^* (dual space) and a\in\mathbb{R}. Show that the closure \bar{C} of C satisfies \bar{C}=\bigcap_{f\in X^*,a\in\mathbb{R}: C\subseteq H(f,a)}H(f,a)...
  45. B

    Potential Energy Functional - Timoshenko Shear Locking

    Folks, The total potential energy functional for an isolated finite element timoshenko beam is given as ## \displaystyle \Pi_e(w, \Psi)=\int_{x_e}^{x_{e+1}} \left[ \frac{EI}{2} \left (\frac{d \Psi}{dx}\right )^2 + \frac{ G A K_s}{2} \left ( \frac {dw}{dx} + \Psi \right )^2 +...\right]dx...
  46. S

    Can Calculus of Variations Prove the Path of Least Resistance for Current Flow?

    Current follows the path of least resistance or shortest path. I just want to prove this or rather reproduce it using calculus of variations. I just want to show it in a fancy way. I want help to form the FUNCTIONAL for it. Useful equations: I=dq/dt=nqvA R=rho*l/A Where v is drift velocity...
  47. K

    Convergence of Fourier Series Coefficients for L2 Functions

    Homework Statement Let e_{n}(t)= \frac{1}{ \sqrt{2\pi}}\cdot e^{int} for n\in\mathbb{Z} and -\pi\le t\le\pi. Show that for any f\in L^{2}[-\pi,\pi] we have that (f,e_{n})=\int_{-\pi}^{\pi}f(t)\cdot e^{-int}dt\to0 as |n|\to \infty. The Attempt at a Solution I want to use dominant convergence...
  48. Τ

    Functional Groups in Alantolactone

    Homework Statement Given the structure of Alantolactone, find two functional groups. 2. The attempt at a solution This was a question that was on my exam recently. I answered Ester and Ether, however Ether was marked incorrect. Instead, only the answers Ester and Alkene were accepted. How is...
  49. R

    Functional Analysis doubt

    Hi some one please help me with the following problem Suppose that T_0 is the interior of a triangle in R^2 with vertices A,B,C. If T_1 is the interior of the trianlge whose vertices are midpoints of the sides of T_0, T_2 the intrior of the triangle whose vertices are midpoints of sides of...
  50. A

    Functional analysis - question about separable dual spaces

    Suppose X is a normed space and X*, the space of all continuous linear functionals on X, is separable. My professor claims in our lecture notes that we KNOW that X* contains functionals of arbitrarily large norm. Can someone explain how we know this, please?
Back
Top