Frechet Derivative & Formal Adjoint Help Needed

  • Mathematica
  • Thread starter Anthony
  • Start date
  • Tags
    Mathematica
In summary: Ant are discussing how to implement code for computing the Frechet derivative and associated formal adjoint of a system of PDEs. Ant shares the code he is using and notes that it works well for computing the derivative but not for the adjoint. He asks for help in identifying the problem. Jeff, who is also a novice, expresses interest in learning Mathematica and asks for book recommendations. In summary, Ant and Jeff are discussing code for computing the Frechet derivative and associated formal adjoint of a system of PDEs. Ant shares his code and asks for help with a problem, while Jeff asks for book recommendations to learn Mathematica.
  • #1
Anthony
83
0
Hi all,

I'm currently trying to implement some code to compute the Frechet derivative of a system of PDEs, and the associated formal adjoint. The code I'm using to compute derivative is:

Code:
FrechetD[support_List, dependVar_List,
independVar_List, testfunction_List] :=
Block[{indep, frechet, deriv, \[Epsilon], r0, x1, x2},
r0 = Function[indep, x1 + \[Epsilon] x2];
frechet = {}; Do[deriv = {};
Do[AppendTo[deriv, \!\(
\*SubscriptBox[\(\[PartialD]\), \(\[Epsilon]\)]\ \((support[[
j]] /. \[IndentingNewLine]dependVar[[
i]] -> \((r0 /. \[IndentingNewLine]{indep ->
independVar, \[IndentingNewLine]x1 ->
dependVar[[i]] @@ independVar, \[IndentingNewLine]x2 ->
testfunction[[i]] @@
independVar})\))\)\) /. \[Epsilon] -> 0],
{i, 1, Length[support]}];
AppendTo[frechet, deriv],
{j, 1, Length[support]}];
frechet]

This works an absolute charm. Then to compute the associated adjoint, I use:

Code:
AdjointFrechetD[support_List, dependVar_List,
independVar_List, testfunction_List] :=
Block[{subrule, $testf, frechet, n, b},
subrule = b_. ($testf^(n__)) @@ independVar :>
(-1)^Plus @@ {n} \!\(
\*SubscriptBox[\(\[PartialD]\), \(Delete[Thread[{independVar, {n}}],
0]\)]\((b\ $testf @@ independVar)\)\);
frechet = FrechetD[support, dependVar,
independVar , testfunction];
Do[frechet =
frechet /.
(subrule /. $testf -> testfunction[[i]]),
{i, 1, Length[testfunction]}];
frechet = Transpose[frechet]]

This doesn't work, sadly. All it seems to do is give me the transpose of the original Frechet derivative matrix. The code originally came from a book I've looked at, so it can't be too far wrong. Sadly, my mathematica skills are pretty much non-existent, so I haven't a clue what the problem is! If anyone could give me some pointers it would be much appreciated!

Many thanks,
Ant
 
Physics news on Phys.org
  • #2
Ant, I wish I could help you but I'm a novice myself. While I look forward to a response to this, if anyone would advise me on the best book to purchase to learn Mathematica 6, any opinions would be appreciated.

Jeff
 
  • #3
on

Hi Anton,

I understand the importance of accurately computing the Frechet derivative and formal adjoint in order to analyze and understand systems of PDEs. It seems like you have a good understanding of the code you are using and have identified where the issue may lie.

One suggestion I have is to carefully check the subrule you are using in the AdjointFrechetD function. It may be helpful to break it down and test it on a simpler system to see if it is producing the desired result. Additionally, you may want to consult with a mathematician or colleague who has more experience with Mathematica to see if they can provide any insights or suggestions.

Overall, it seems like you are on the right track and with some fine-tuning, you will be able to successfully compute the formal adjoint. Good luck with your research!
 

1. What is a Frechet derivative?

A Frechet derivative is a type of derivative used in functional analysis to determine the rate of change of a function. It is defined as the best linear approximation to the function at a given point, and is typically used for functions between Banach spaces.

2. How is a Frechet derivative different from a traditional derivative?

A traditional derivative is used for functions between real numbers, whereas a Frechet derivative is used for functions between Banach spaces. Additionally, a traditional derivative is a scalar value, while a Frechet derivative is a bounded linear operator.

3. What is a formal adjoint?

A formal adjoint is a mathematical concept used to describe the relationship between two operators. It is defined as the transpose of the operator's linear map, and is used to determine properties such as symmetry and self-adjointness.

4. How are Frechet derivatives and formal adjoints related?

Frechet derivatives and formal adjoints are related because they both involve linear operators. In particular, the formal adjoint of a linear operator can be used to define the Frechet derivative of a function.

5. Why are Frechet derivatives and formal adjoints important in mathematics?

Frechet derivatives and formal adjoints are important in mathematics because they provide a rigorous framework for understanding the derivatives and linear operators in more general spaces. They are used in many areas of mathematics, including functional analysis, differential equations, and optimization.

Back
Top