Constructing a connection between two functions











up vote
0
down vote

favorite












Let $f(x)$ and $g(x)$ be two functions on the real numbers. At some point, say $x=0$ for convenience, the two functions intersect: $f(0) = g(0)$. The first and higher derivatives of $f$ and $g$ can be assumed to be unequal at $x=0$.



The aim is to construct a new function $h(x)$, which is equal to $f(x)$ for $x < -d$ and equal to $g(x)$ for $x > d$, with $d$ a small parameter. We want the function $h$ to be as smooth as possible. For that reason we introduced the small interval $(-d, d)$ where the transition between $f$ and $g$ takes place.



There are two approaches that come to mind:



One of the simplest methods is presumably to choose a sigmoidal function $s(x)$ which runs between $0$ and $1$, for example $s(x) = 0.5*(1+tanh(x/d))$ will do the job. We can then construct $h$ as follows: $h(x) = (1-s(x))*f(x) + s(x)*g(x)$. However, I am afraid that the result is often a bit more curved than anticipated.



Another method is to define a polynomial of degree $N$ on the interval $(-d, d)$. The coefficients are determined by matching the lowest Taylor coefficients of the polynomial on the one hand and $f$ or $g$ on the other hand, at $x=-d$ and $x=d$.



I wonder: is there a particular method that is recommended in the mathematical literature?










share|cite|improve this question






















  • If $f$ is $C^infty$ near $-d$ and $g$ is $C^infty$ near $d$, you can glue them together with a $C^infty$ function using en.wikipedia.org/wiki/…
    – Federico
    Nov 20 at 0:45










  • This is the best you can get from the point of view of regularity, but the transition function can be chosen quite arbitrarily, so you might prefer some more specific gluing methods
    – Federico
    Nov 20 at 0:48















up vote
0
down vote

favorite












Let $f(x)$ and $g(x)$ be two functions on the real numbers. At some point, say $x=0$ for convenience, the two functions intersect: $f(0) = g(0)$. The first and higher derivatives of $f$ and $g$ can be assumed to be unequal at $x=0$.



The aim is to construct a new function $h(x)$, which is equal to $f(x)$ for $x < -d$ and equal to $g(x)$ for $x > d$, with $d$ a small parameter. We want the function $h$ to be as smooth as possible. For that reason we introduced the small interval $(-d, d)$ where the transition between $f$ and $g$ takes place.



There are two approaches that come to mind:



One of the simplest methods is presumably to choose a sigmoidal function $s(x)$ which runs between $0$ and $1$, for example $s(x) = 0.5*(1+tanh(x/d))$ will do the job. We can then construct $h$ as follows: $h(x) = (1-s(x))*f(x) + s(x)*g(x)$. However, I am afraid that the result is often a bit more curved than anticipated.



Another method is to define a polynomial of degree $N$ on the interval $(-d, d)$. The coefficients are determined by matching the lowest Taylor coefficients of the polynomial on the one hand and $f$ or $g$ on the other hand, at $x=-d$ and $x=d$.



I wonder: is there a particular method that is recommended in the mathematical literature?










share|cite|improve this question






















  • If $f$ is $C^infty$ near $-d$ and $g$ is $C^infty$ near $d$, you can glue them together with a $C^infty$ function using en.wikipedia.org/wiki/…
    – Federico
    Nov 20 at 0:45










  • This is the best you can get from the point of view of regularity, but the transition function can be chosen quite arbitrarily, so you might prefer some more specific gluing methods
    – Federico
    Nov 20 at 0:48













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Let $f(x)$ and $g(x)$ be two functions on the real numbers. At some point, say $x=0$ for convenience, the two functions intersect: $f(0) = g(0)$. The first and higher derivatives of $f$ and $g$ can be assumed to be unequal at $x=0$.



The aim is to construct a new function $h(x)$, which is equal to $f(x)$ for $x < -d$ and equal to $g(x)$ for $x > d$, with $d$ a small parameter. We want the function $h$ to be as smooth as possible. For that reason we introduced the small interval $(-d, d)$ where the transition between $f$ and $g$ takes place.



There are two approaches that come to mind:



One of the simplest methods is presumably to choose a sigmoidal function $s(x)$ which runs between $0$ and $1$, for example $s(x) = 0.5*(1+tanh(x/d))$ will do the job. We can then construct $h$ as follows: $h(x) = (1-s(x))*f(x) + s(x)*g(x)$. However, I am afraid that the result is often a bit more curved than anticipated.



Another method is to define a polynomial of degree $N$ on the interval $(-d, d)$. The coefficients are determined by matching the lowest Taylor coefficients of the polynomial on the one hand and $f$ or $g$ on the other hand, at $x=-d$ and $x=d$.



I wonder: is there a particular method that is recommended in the mathematical literature?










share|cite|improve this question













Let $f(x)$ and $g(x)$ be two functions on the real numbers. At some point, say $x=0$ for convenience, the two functions intersect: $f(0) = g(0)$. The first and higher derivatives of $f$ and $g$ can be assumed to be unequal at $x=0$.



The aim is to construct a new function $h(x)$, which is equal to $f(x)$ for $x < -d$ and equal to $g(x)$ for $x > d$, with $d$ a small parameter. We want the function $h$ to be as smooth as possible. For that reason we introduced the small interval $(-d, d)$ where the transition between $f$ and $g$ takes place.



There are two approaches that come to mind:



One of the simplest methods is presumably to choose a sigmoidal function $s(x)$ which runs between $0$ and $1$, for example $s(x) = 0.5*(1+tanh(x/d))$ will do the job. We can then construct $h$ as follows: $h(x) = (1-s(x))*f(x) + s(x)*g(x)$. However, I am afraid that the result is often a bit more curved than anticipated.



Another method is to define a polynomial of degree $N$ on the interval $(-d, d)$. The coefficients are determined by matching the lowest Taylor coefficients of the polynomial on the one hand and $f$ or $g$ on the other hand, at $x=-d$ and $x=d$.



I wonder: is there a particular method that is recommended in the mathematical literature?







real-analysis functions






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 20 at 0:37









M. Wind

2,096715




2,096715












  • If $f$ is $C^infty$ near $-d$ and $g$ is $C^infty$ near $d$, you can glue them together with a $C^infty$ function using en.wikipedia.org/wiki/…
    – Federico
    Nov 20 at 0:45










  • This is the best you can get from the point of view of regularity, but the transition function can be chosen quite arbitrarily, so you might prefer some more specific gluing methods
    – Federico
    Nov 20 at 0:48


















  • If $f$ is $C^infty$ near $-d$ and $g$ is $C^infty$ near $d$, you can glue them together with a $C^infty$ function using en.wikipedia.org/wiki/…
    – Federico
    Nov 20 at 0:45










  • This is the best you can get from the point of view of regularity, but the transition function can be chosen quite arbitrarily, so you might prefer some more specific gluing methods
    – Federico
    Nov 20 at 0:48
















If $f$ is $C^infty$ near $-d$ and $g$ is $C^infty$ near $d$, you can glue them together with a $C^infty$ function using en.wikipedia.org/wiki/…
– Federico
Nov 20 at 0:45




If $f$ is $C^infty$ near $-d$ and $g$ is $C^infty$ near $d$, you can glue them together with a $C^infty$ function using en.wikipedia.org/wiki/…
– Federico
Nov 20 at 0:45












This is the best you can get from the point of view of regularity, but the transition function can be chosen quite arbitrarily, so you might prefer some more specific gluing methods
– Federico
Nov 20 at 0:48




This is the best you can get from the point of view of regularity, but the transition function can be chosen quite arbitrarily, so you might prefer some more specific gluing methods
– Federico
Nov 20 at 0:48















active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3005758%2fconstructing-a-connection-between-two-functions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3005758%2fconstructing-a-connection-between-two-functions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

Puebla de Zaragoza

Musa