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

    MHB Why do we deduce that the functional is continuous in respect to the other norm?

    Hello! (Wave) Let $V=C^1([a,b])$. Show that if $J$ is a continuous functional in respect to the norm $||y||_1:=||y||_{\infty}+||y'||_{\infty}, y \in V$ then it is also continuous in respect to the norm $||y||:=||y||_{\infty}$. Also, show that the inverse of the above claim does not hold. Let...
  2. evinda

    MHB Is there a contradiction in assuming that $J$ is linear over $C^1([a,b])$?

    Hello! (Wave) Is the following functional over $C^1([a,b])$ linear? $$J(y)= \int_a^b (y')^2 dx+ G(y(b))$$ That's what I have thought:if $J$ would be linear it would have to hold: $\forall y \in C^1([a,b]), \forall \lambda \in \mathbb{R}$ $J(\lambda y)=\lambda J(y)$ or equivalently...
  3. A

    Functional Derivative: Evaluating & Understanding

    In my textbook (see attached picture) there appears a functional derivative, but I honestly don't know how to evaluate a quantity like this. What should I do? I have tried to google but all I could find was how to take functional derivatives, where polynomials appeared under the integral, while...
  4. C

    Functional derivative of normal function

    I can't convince myself whether the following functional derivative is trivial or not: ##\frac \delta {\delta \psi(x)} \big[ \partial_x \psi(x)\big],## where ##\partial_x## is a standard derivative with respect to ##x##. One could argue that ## \partial_x \psi(x) = \int dx' [\partial_{x'}...
  5. W

    Functional Dependence (In Table/General)

    Hi all, hope this is the right forum. Please feel free to move it otherwise: I am confused on whether functional dependence can be determined uniquely by the particulars of a given table, or if it is determined in a more general sense So I have my relational table. Let A,B be attributes ...
  6. S

    Should I Study Functional Analysis or Calculus on Manifolds?

    I have the opportunity to pursue an independent study in functional analysis (using Kreyszig's book) or calculus on manifolds (using Tu's book) next semester. I think that both of the subjects are interesting and I would like to study them both at some point in my life, but I can only choose one...
  7. K

    Properties of -COOR functional group?

    By properties I mean the +I or -I effect as compared to other functional groups along with whether it induces a +R or -R effect?
  8. Einj

    Gaussian functional integral with constant operator

    Hello everyone. What it the result for a Gaussian functional integral when the "matrix" is nothing but a number? Mathematically speaking is the following true? $$ \int \mathcal{D}\phi e^{-\int d^3k f(k) |\phi(k)|^2}\propto \left(f(k)\right)^{-1/2} $$ Here ##f(k)## is just a function of k, not...
  9. BiGyElLoWhAt

    Calculating Functional Derivatives: Understanding Notation and Examples

    If I understand what's going on (quite possibly I don't), I think my book is using bad (confusing) notation. Homework Statement As written: "Calculate ##\frac{\delta H[f]}{\delta f(z)} \ \text{where} \ H=\int G(x,y)f(y)dy##" and ##\frac{\delta H[f]}{\delta f(z)}## is the functional derivative...
  10. AXidenT

    Functional Analaysis or Abstract Algebra or Fields?

    Entering my third year of my bachelor of science majoring in maths/physics and having some trouble deciding what courses to do this semester. I know for sure I will be taking complex analysis and 3rd year quantum however am having trouble picking between 3 in particular for my final two courses...
  11. A

    Density functional theory and partial charge transfer

    When density functional theory is used to simulate a molecule adsorbed on a surface, it turns out that due to their interaction, a fraction of an electron is transferred from the surface to the molecule or vice versa. These interactions are normally categorised in interactions involving...
  12. A

    Use of Carb- Prefix before functional group names?

    1. I have been facing problem with the use of carb-prefix under same special conditions in organic chemistry nomenclature.Homework Equations3. One friend of mine suggested me that if there are 3 or more similar functional group, out of which none can be given priority in a single structure, then...
  13. T

    Finding the functional extremum

    Homework Statement I have been given a functional $$S[x(t)]= \int_0^T \Big[ \Big(\frac {dx(t)}{dt}\Big)^{2} + x^{2}(t)\Big] dt$$ I need a curve satisfying x(o)=0 and x(T)=1, which makes S[x(t)] an extremum Homework Equations Now I know about action being $$S[x(t)]= \int_t^{t'} L(\dot x, x)...
  14. G

    Linear operator, linear functional difference?

    What is a difference between linear operator and linear functional? Do I understand it correctly that linear operator is any operator that when applied on a vector from a vector space, gives again a vector from this vector space. And also obeys linearity conditions. And linear functional is a...
  15. F

    Functional Analysis vs. Complex Analysis?

    I have one slot to fill in in the coming term. The two candidates are Functional Analysis and Complex Analysis (both on the undergraduate level). Here are some questions: 1) Which one would you pick and why? 2) What other classes in the standard B.Sc. math curriculum rely on either of these...
  16. P

    Gaussian Functional Integral

    I am new to path integral and struggling with the computation involving Gaussian functional integrals. Could anyone show me the steps of computing the following integral? \int D \phi e^{-S}, where S = \int dx~d \tau [(\frac{\partial \phi}{\partial x})^2+2 i \frac{\partial \theta}{\partial...
  17. T

    Functional relation and implicit functions

    This is more a conceptual question. So i am doing some self review of multi variate calculus and i am looking at functinal relations of the form F(x, y, z,...) = 0 In the book they talk about implicit differentiation. Now i fully understand how to do the mechanics of it, but i was trying to...
  18. D

    Functional Analysis book for beginners

    Hi, I need a functional analysis book. I have Kreyszig's book. I'm at continuous mapping but I have some problems with completeness and accumulation points. So I would like to read a lot excercises about these introductory stuff. What are your suggestions? Thanks.
  19. Pythagorean

    Researchers claim only ~8% of human DNA is functional

    Something I've always wondered about. It's neat to see a quantitative answer, finally. "To reach the new figure, Dr Lunter and his colleagues took advantage of the ability of evolution to discern which activities matter and which do not. They identified how much of our genome has avoided...
  20. P

    Functional equation problem ( edited )

    Let f : R -> R be a continuous function such that, f(x) - 2f(x/2) + f(x/4) = x^2 then, . f(3) = ? Answer to be calculated in terms of f(0). I am puzzled on how to approach such problems. Some insight would be greatly appreciated.
  21. Bleakfacade

    Functional relationship between pressure and position(1d).

    Hello there, so today I started doing my research on oscillations in a course on advanced mechanics. The experiment was to mathematically model the speed of sound in air and experimentally prove the usability of the model. To keep it simple and pose my question as directly as possible, my...
  22. T

    Need a Functional Analysis book

    I need a measure/integration theory book that covers the basics. I had already calculus, complex analysis, ODEs and topics of PDEs/Sturm-Liouville problem. More specifically I need to learn functional analysis to be prepared for stochastic calculus. Any suggestions? Thank you.
  23. DavideGenoa

    Continuous functional s.t. $f(x_0)\ne 0$

    I read that in any locally convex topological space X, not necessarily a Hausdorff space but with linear operations continuous, for any ##x_0\ne 0## we can define a continuous linear functional f:X\to K such that f(x_0)\ne 0. I cannot find a proof of that anywhere and cannot prove it myself...
  24. F

    Solving tricky functional equation

    Consider the following linear functional operator: $$Q_w[f(x)] = \lim_{h\rightarrow w} \lbrace \frac{f(x + h) - f(x)}{h} \rbrace $$ How does one solve the equation $$a_0(x)Q_0[f(x)] = a_1(x)Q_1[f(x)]$$ Spelt out that is: $$a_0(x)*f'(x) = a_1(x)(f(x+1) - f(x))$$ For the case of constant...
  25. D

    Chemistry Functional group in aspartame molecule

    Homework Statement which functional group is present in aspatame molecule? Homework Equations The Attempt at a Solution why the carbonyl group COO- is not present in the diagram? I can find it in the diagram
  26. J

    Functional and composite function

    What is the difference between a functional and a composite function? Also, look those implicit equations: ##F(x, y(x))=0##, ##F(t, \vec{r}(t))=0##, ##F(x, y(x), y'(x), y''(x))=0##, ##F(t, \vec{r}(t), \vec{r}'(t))=0##... Can be understood that ##F## is the functional?
  27. M

    Functional analysis: Shoe set is not dense in C([a,b])

    Homework Statement Let [a,b] \subset \mathbb{R} be a compact interval and t0 \in [a,b] fixed. Show that the set S = {f \in C[a,b] | f(t_0) = 0} is not dense in the space C[a,b] (with the sup-norm). Homework Equations Dense set: http://en.wikipedia.org/wiki/Dense_set sup -...
  28. D

    Calculus of Variations: Nature of the Functional

    Let \normalsize S[y] = \int ^{a}_{b} f[y, \dot{y}, x] dx be the functional i want to minimize. Why does \normalsize f (inside the integral) take this specific form? Would i not be able to minimize the integral, \normalsize S , if f had any other form instead of f = f[x, y, \dot{y}] ?
  29. Matterwave

    Is Functional Differentiation Applicable to Quantum Field Theory Functionals?

    Hi guys, I'm not sure where to put this question, so I'll just put it here. If a mod knows of a better place, just point me to it, thanks. I'm looking at the functional differentiation equation: $$\left.\frac{dF[f+\tau h]}{d\tau}\right|_{\tau=0}\equiv \int\frac{\delta F[f]}{\delta...
  30. Matterwave

    Functional differential equation

    Homework Statement Solve: $$\frac{\delta F[f]}{\delta f(x)}=b(x)f(x)^2F[f]$$ For b(x) a fixed smooth function. Homework Equations $$\left.\frac{dF[f+\tau h]}{d\tau}\right|_{\tau=0}\equiv \int\frac{\delta F[f]}{\delta f(x)}h(x)dx$$ The Attempt at a Solution This isn't a homework problem...
  31. Matterwave

    Functional differentiation and integration

    Hi guys, I'm trying to study the functional approach to quantization in QFT. The QFT books seem to often "sweep things under the rug" and not be too rigorous when it comes to issues like integral convergence, and the like. So I was wondering if there was a more mathematically rigorous...
  32. B

    Chain Rule of a functional to an exponential

    Homework Statement Suppose f is differentiable on \mathbb R and \alpha is a real number. Let G(x) = [f(x)]^a Find the expression for G'(x) Homework Equations I'm pretty sure that I got this one right, but I really want to double check and make sure. The Attempt at a Solution...
  33. M

    How to generate functional in FEM

    Please suggest me, how to generate weak form or functional of any partial diffrential equation ( mostely second order) in Finite Element Method. Thanks in advance.
  34. C

    D-wave superconductivity: Functional forms?

    Two questions, really: I’m finding it hard to wrap my head around the connections between k-space and real-space for d-wave symmetry, as well as the connections between “order parameter,” “gap,” “Cooper pair wave function,” and “superconducting wavefunction,” which are all mentioned at various...
  35. Saitama

    MHB Solving a Functional Equation Problem: Finding f(3)-f(0)

    Problem: Let $f:R\rightarrow R$ be a continuous function such that $$f(x)-2f\left(\frac{x}{2}\right)+f \left( \frac{x}{4} \right)=x^2$$ Find $f(3)-f(0)$. Attempt: I really don't know how should I approach this problem. I could only deduce that $f(0)=0$. Then I tried putting a few values for $x$...
  36. S

    Calculate the extreme value of functional

    Homework Statement We have functional ##I(y)=\int_{0}^{2}{y}'(2+e^x{y}')dx## where ##y\in C^1(\mathbb{R})## and ##y(0)=0##. Calculate the extreme value.Homework Equations The Attempt at a Solution I am having some troubles here... :/ From Euler-Lagrange equation we get ##\frac{\partial...
  37. S

    Calculating the Extreme Value of a Functional with Given Boundary Conditions

    Homework Statement We have functional ##A(y)=\int_{-1}^{1}(4y+({y}')^2)dx## where ##y\in C^1(\mathbb{R})## and ##y(-1)=1## and ##y(1)=3##. a) Calculate ##A(y)## if graph for ##y## is line segment. b) Calculate the extreme value of ##A(y)## for that ##y##. That does it represent...
  38. L

    Finding Extremals of a Functional

    Homework Statement Find extremals of the functional ##\Phi(y,z)=\int^{\frac{\pi}{2}}_0((y')^2+(z')^2+2yz)dx## for ##y(0)=0##, ##y(\frac{\pi}{2})=1##, ##z(0)=0##, ##z(\frac{\pi}{2})=-1##Homework Equations The Attempt at a Solution Well I have a solution but I have problem how to start with it...
  39. U

    Maximizing f(x) with Inequality Constraint: Solving a Functional Inequation

    Homework Statement The function f satisfies \dfrac{f(x)}{f(y)} \leq 2^{(x-y)^2} x,y \in D where D denotes domain set of the function, then f(x) can be I have a set of options as well but I'm not posting it now. I will post it if required, later. The Attempt at a Solution I have dealt...
  40. R

    Functional analysis Gateaux & Frechet derivatives)

    Homework Statement https://imagizer.imageshack.us/v2/622x210q90/833/sqaw.png I am having difficulty understanding the notation <h, f''(x0)h>
  41. C

    What is this functional group, and how do you make it

    On an exam question recently, I had to perform a retrosynthesis on a molecule and it had this functional group on it: it took me by surprise. I decided to cleave the whole thing off, and replace it with a double bond (cuz I know you can make cis diols from double bonds) then things seemed to...
  42. I

    Fourier transform of a functional

    Hello, I was wondering if such a thing even exists, so here it goes... Let's say I have a function x(s) (it is real, smooth, differentiable, etc.) defined on (0,1). In addition, dx/ds = 0 on the boundary (s=0 and s=1). I can compute its Fourier transform (?) as a_p = \int_0^1 x(s)...
  43. D

    Functional Equation with Real Numbers: Solving for f(x) on R->R

    Homework Statement Let a.b,c,d be real numbers such that a ≠ b and c ≠ 0 , find f:R->R for which this statement holds: af(x+y) + bf(x-y) = cf(x) + dy , for all x,y real numbers. Homework Equations Well this is a functional equation, that I know. I have less experience with...
  44. Sudharaka

    MHB Norm of a Bounded Linear Functional

    Hi everyone, :) Here's a question with my answer, but I just want to confirm whether this is correct. The answer seems so obvious that I just thought that maybe this is not what the question asks for. Anyway, hope you can give some ideas on this one. Problem: Let \(X\) be a finite...
  45. Einj

    Question on functional derivative

    Hi everyone! I have a question on functional derivatives. I have a function defined as: $$ F[\{u\}]=\int d^3r \sum_{i=1}^3 \frac{\partial u_i}{\partial r_i}, $$ where u_i(\vec r) is a function of the position. I need to compute its functional derivative. To do that I did the following: $$...
  46. H

    Functional derivatives worksheet

    Greetings, I want to become more fluent using functional derivatives. Does anyone have a link to sets of problems involving functional derivatives or anything like that (e.g., a worksheet from a class where they were used or something)? The lengthier the better, and ideally the solutions...
  47. jk22

    How to solve this functional (recurrence) equation ?

    I'm in a problem where I have to solve the following functional equation : F(n)^2=n+F(n+1) Does anyone know some methods to solve this kind of problems ? A similar equation happens in Ramanujan example of root denesting : http://en.wikipedia.org/wiki/Nested_radical#Square_roots
  48. U

    What is the Condition for a Unique Solution in a Complex Functional Equation?

    Homework Statement Suppose f(z) is a possibly complex valued function of a complex valued function of a complex number z, which satisfies a functional equation of the form af(z)+bf(\omega ^2 z)=g(z) for all z in C, where a and b are some fixed complex numbers and g(z) is some function of z and...
  49. I

    How can I solve a non-linear functional problem numerically?

    Hello, I'm not really sure where does this question fit and what title should it bear, but here is my problem: \psi(x) \exp (a\psi(x)^2) = C f(x) given a positive definite f(x), find ψ(x) and the constant C, subject to the condition \int \psi(x)\, dx = 1 I want to solve this numerically...
  50. A

    Preimage of Linear Functional and Closedness of Subspace

    Homework Statement Let f be a linear functional and set A=f-1({0}) Show that A is a closed linear subspace. Homework Equations The linearity comes from the fact that if f(a)=0 and f(b)=0 then f(βa+γb)=βf(a)+γf(b)=0 But how do we know it is closed? Do we show every sequence in A is...
Back
Top