Calculating curvature of a contour
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have an equation of a scalar field in the form
$$
f(x, y) = x^2 + y^2 + xy + c.
$$
I want to find the curvature of the contour of the curve at $ f_c = f(0.5, 0.5) $.
So I need to calculate the derivative $ fracmathrm dymathrm dx $ and $ fracmathrm d^2ymathrm dx^2 $
I can solve the equation $ f(x, y) = f_c $ and get the derivative of $ f(x, y) $ w.r.t $ x $.
On paper we do,
d/dx (f(x,y))=d/dx(fc)
2*x+2*y*(dy/dx)+y+x(dy/dx)=0
(dy/dx)=-(2*x+y)/(x+2*y)
and further d/dx(dy/dx) for a curvature approximate
how can I rearrange the equation such that I can get the value of dy/dx on mathematica
EDIT:
This is what I tried so far:
Clear["Global`*"]
ftest[x_, y_] = x*x + y*y + x*y + c;
dftest = (D[ftest[x, y], x]/D[ftest[x, y], y]);
d2ftest = D[dftest, x];
Sol :
-((2 x + y)/(x + 2 y)^2) + 2/(x + 2 y)
However this will be wrong as I will be taking the ratio of partials w.r.t. x and y
calculus-and-analysis geometry differential-geometry
New contributor
 |Â
show 1 more comment
up vote
1
down vote
favorite
I have an equation of a scalar field in the form
$$
f(x, y) = x^2 + y^2 + xy + c.
$$
I want to find the curvature of the contour of the curve at $ f_c = f(0.5, 0.5) $.
So I need to calculate the derivative $ fracmathrm dymathrm dx $ and $ fracmathrm d^2ymathrm dx^2 $
I can solve the equation $ f(x, y) = f_c $ and get the derivative of $ f(x, y) $ w.r.t $ x $.
On paper we do,
d/dx (f(x,y))=d/dx(fc)
2*x+2*y*(dy/dx)+y+x(dy/dx)=0
(dy/dx)=-(2*x+y)/(x+2*y)
and further d/dx(dy/dx) for a curvature approximate
how can I rearrange the equation such that I can get the value of dy/dx on mathematica
EDIT:
This is what I tried so far:
Clear["Global`*"]
ftest[x_, y_] = x*x + y*y + x*y + c;
dftest = (D[ftest[x, y], x]/D[ftest[x, y], y]);
d2ftest = D[dftest, x];
Sol :
-((2 x + y)/(x + 2 y)^2) + 2/(x + 2 y)
However this will be wrong as I will be taking the ratio of partials w.r.t. x and y
calculus-and-analysis geometry differential-geometry
New contributor
You could solve your equation fory
, then differentiate.
â b.gatessucks
1 hour ago
Have you tried anything? Rules require you to show a minimal familiarity with Mathematica.
â Kubaâ¦
1 hour ago
@b.gatessucks How do I do that.. I used D[Solve[f(x,y)=f(c)] but it returns 0 -> InverseFunction[fs,2,2]^(1,0)[t,0]
â Some_guy
1 hour ago
Start by solving yourftest
fory
.
â b.gatessucks
1 hour ago
1
So your implicit function is something like ` f[x,y]:= x^2 + y^2 + x y - 3/4==0` ?
â Ulrich Neumann
1 hour ago
 |Â
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have an equation of a scalar field in the form
$$
f(x, y) = x^2 + y^2 + xy + c.
$$
I want to find the curvature of the contour of the curve at $ f_c = f(0.5, 0.5) $.
So I need to calculate the derivative $ fracmathrm dymathrm dx $ and $ fracmathrm d^2ymathrm dx^2 $
I can solve the equation $ f(x, y) = f_c $ and get the derivative of $ f(x, y) $ w.r.t $ x $.
On paper we do,
d/dx (f(x,y))=d/dx(fc)
2*x+2*y*(dy/dx)+y+x(dy/dx)=0
(dy/dx)=-(2*x+y)/(x+2*y)
and further d/dx(dy/dx) for a curvature approximate
how can I rearrange the equation such that I can get the value of dy/dx on mathematica
EDIT:
This is what I tried so far:
Clear["Global`*"]
ftest[x_, y_] = x*x + y*y + x*y + c;
dftest = (D[ftest[x, y], x]/D[ftest[x, y], y]);
d2ftest = D[dftest, x];
Sol :
-((2 x + y)/(x + 2 y)^2) + 2/(x + 2 y)
However this will be wrong as I will be taking the ratio of partials w.r.t. x and y
calculus-and-analysis geometry differential-geometry
New contributor
I have an equation of a scalar field in the form
$$
f(x, y) = x^2 + y^2 + xy + c.
$$
I want to find the curvature of the contour of the curve at $ f_c = f(0.5, 0.5) $.
So I need to calculate the derivative $ fracmathrm dymathrm dx $ and $ fracmathrm d^2ymathrm dx^2 $
I can solve the equation $ f(x, y) = f_c $ and get the derivative of $ f(x, y) $ w.r.t $ x $.
On paper we do,
d/dx (f(x,y))=d/dx(fc)
2*x+2*y*(dy/dx)+y+x(dy/dx)=0
(dy/dx)=-(2*x+y)/(x+2*y)
and further d/dx(dy/dx) for a curvature approximate
how can I rearrange the equation such that I can get the value of dy/dx on mathematica
EDIT:
This is what I tried so far:
Clear["Global`*"]
ftest[x_, y_] = x*x + y*y + x*y + c;
dftest = (D[ftest[x, y], x]/D[ftest[x, y], y]);
d2ftest = D[dftest, x];
Sol :
-((2 x + y)/(x + 2 y)^2) + 2/(x + 2 y)
However this will be wrong as I will be taking the ratio of partials w.r.t. x and y
calculus-and-analysis geometry differential-geometry
calculus-and-analysis geometry differential-geometry
New contributor
New contributor
edited 7 mins ago
Henrik Schumacher
43.5k263129
43.5k263129
New contributor
asked 1 hour ago
Some_guy
63
63
New contributor
New contributor
You could solve your equation fory
, then differentiate.
â b.gatessucks
1 hour ago
Have you tried anything? Rules require you to show a minimal familiarity with Mathematica.
â Kubaâ¦
1 hour ago
@b.gatessucks How do I do that.. I used D[Solve[f(x,y)=f(c)] but it returns 0 -> InverseFunction[fs,2,2]^(1,0)[t,0]
â Some_guy
1 hour ago
Start by solving yourftest
fory
.
â b.gatessucks
1 hour ago
1
So your implicit function is something like ` f[x,y]:= x^2 + y^2 + x y - 3/4==0` ?
â Ulrich Neumann
1 hour ago
 |Â
show 1 more comment
You could solve your equation fory
, then differentiate.
â b.gatessucks
1 hour ago
Have you tried anything? Rules require you to show a minimal familiarity with Mathematica.
â Kubaâ¦
1 hour ago
@b.gatessucks How do I do that.. I used D[Solve[f(x,y)=f(c)] but it returns 0 -> InverseFunction[fs,2,2]^(1,0)[t,0]
â Some_guy
1 hour ago
Start by solving yourftest
fory
.
â b.gatessucks
1 hour ago
1
So your implicit function is something like ` f[x,y]:= x^2 + y^2 + x y - 3/4==0` ?
â Ulrich Neumann
1 hour ago
You could solve your equation for
y
, then differentiate.â b.gatessucks
1 hour ago
You could solve your equation for
y
, then differentiate.â b.gatessucks
1 hour ago
Have you tried anything? Rules require you to show a minimal familiarity with Mathematica.
â Kubaâ¦
1 hour ago
Have you tried anything? Rules require you to show a minimal familiarity with Mathematica.
â Kubaâ¦
1 hour ago
@b.gatessucks How do I do that.. I used D[Solve[f(x,y)=f(c)] but it returns 0 -> InverseFunction[fs,2,2]^(1,0)[t,0]
â Some_guy
1 hour ago
@b.gatessucks How do I do that.. I used D[Solve[f(x,y)=f(c)] but it returns 0 -> InverseFunction[fs,2,2]^(1,0)[t,0]
â Some_guy
1 hour ago
Start by solving your
ftest
for y
.â b.gatessucks
1 hour ago
Start by solving your
ftest
for y
.â b.gatessucks
1 hour ago
1
1
So your implicit function is something like ` f[x,y]:= x^2 + y^2 + x y - 3/4==0` ?
â Ulrich Neumann
1 hour ago
So your implicit function is something like ` f[x,y]:= x^2 + y^2 + x y - 3/4==0` ?
â Ulrich Neumann
1 hour ago
 |Â
show 1 more comment
2 Answers
2
active
oldest
votes
up vote
2
down vote
Clear[f]
f[x_, y_] := x^2 + y[x]^2 + x y[x] + c == fc
Solve[D[f[x, y], x, 1], y'[x]][[1, 1]] // FullSimplify
Solve[D[f[x, y], x, 2], y''[x]][[1, 1]] /. % // FullSimplify
y'[x] -> -(2 x + y[x])/(x + 2 y[x])
y''[x] -> -6 (x^2 + y[x] (x + y[x])/(x + 2 y[x])^3
add a comment |Â
up vote
1
down vote
IIRC, the second fundamental form $I!I$ of a levelset $M = varPhi^-1(0)$ of a mapping $varPhi colon mathbbR^n to mathbbR^m$, $m<n$ at point $x in mathbbR^n$ is given (up to sign that I use to mix up) by
$$ I!I(x) = pm DvarPhi(x)^dagger , D^2varPhi(x),$$
where $DvarPhi(x)^dagger$ denotes the Moore-Penrose pseudoinverse of the Jacobian $DvarPhi(x)$ of $varPhi$. Here, I assume that $DvarPhi(x)$ is surjective (but a similar formula can be derived if $DvarPhi$ has constant rank in a neighborhood of $x$).
More precisely, we have
$$ I!I(x)(u,v) = pm DvarPhi(x)^dagger , D^2varPhi(x)(u,v) quad textfor all $u,,v in T_xM = operatornameker(DvarPhi(x))$$$
as $I!I(x)(u,v)$ is not really meaningful for non-tangent vectors $u, , v not in T_xM$.
This can be obtained as follows:
æ = x, y [Function] x^2 + y^2 + x y + c;
Dæ = D[æ[x, y], x, y, 1];
DDæ = D[æ[x, y], x, y, 2];
II = Transpose[LinearSolve[Dæ. Transpose [Dæ], Dæ]].DDæ
In this 2-dimensional example, the curvature $kappa$ of the level set at point $(x,y)$ should be (up to sign) computable as
ý = Dæ[[1]]/Sqrt[Total[Dæ^2, 2]];
à= RotationMatrix[Pi/2].ý
ú = ý.(II.ÃÂ).à// Simplify
(6 (x^2 + x y + y^2))/(5 x^2 + 8 x y + 5 y^2)^(3/2)
Here, ý
is the normal to the levelset (point upwards with respect to the function æ
) and ÃÂ
is the tangent obtained by counterclockwise 90-degree-rotation of ý
.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Clear[f]
f[x_, y_] := x^2 + y[x]^2 + x y[x] + c == fc
Solve[D[f[x, y], x, 1], y'[x]][[1, 1]] // FullSimplify
Solve[D[f[x, y], x, 2], y''[x]][[1, 1]] /. % // FullSimplify
y'[x] -> -(2 x + y[x])/(x + 2 y[x])
y''[x] -> -6 (x^2 + y[x] (x + y[x])/(x + 2 y[x])^3
add a comment |Â
up vote
2
down vote
Clear[f]
f[x_, y_] := x^2 + y[x]^2 + x y[x] + c == fc
Solve[D[f[x, y], x, 1], y'[x]][[1, 1]] // FullSimplify
Solve[D[f[x, y], x, 2], y''[x]][[1, 1]] /. % // FullSimplify
y'[x] -> -(2 x + y[x])/(x + 2 y[x])
y''[x] -> -6 (x^2 + y[x] (x + y[x])/(x + 2 y[x])^3
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Clear[f]
f[x_, y_] := x^2 + y[x]^2 + x y[x] + c == fc
Solve[D[f[x, y], x, 1], y'[x]][[1, 1]] // FullSimplify
Solve[D[f[x, y], x, 2], y''[x]][[1, 1]] /. % // FullSimplify
y'[x] -> -(2 x + y[x])/(x + 2 y[x])
y''[x] -> -6 (x^2 + y[x] (x + y[x])/(x + 2 y[x])^3
Clear[f]
f[x_, y_] := x^2 + y[x]^2 + x y[x] + c == fc
Solve[D[f[x, y], x, 1], y'[x]][[1, 1]] // FullSimplify
Solve[D[f[x, y], x, 2], y''[x]][[1, 1]] /. % // FullSimplify
y'[x] -> -(2 x + y[x])/(x + 2 y[x])
y''[x] -> -6 (x^2 + y[x] (x + y[x])/(x + 2 y[x])^3
answered 1 hour ago
ÃÂûÃÂþñýôÃÂÿàÃÂõóó
3,2341927
3,2341927
add a comment |Â
add a comment |Â
up vote
1
down vote
IIRC, the second fundamental form $I!I$ of a levelset $M = varPhi^-1(0)$ of a mapping $varPhi colon mathbbR^n to mathbbR^m$, $m<n$ at point $x in mathbbR^n$ is given (up to sign that I use to mix up) by
$$ I!I(x) = pm DvarPhi(x)^dagger , D^2varPhi(x),$$
where $DvarPhi(x)^dagger$ denotes the Moore-Penrose pseudoinverse of the Jacobian $DvarPhi(x)$ of $varPhi$. Here, I assume that $DvarPhi(x)$ is surjective (but a similar formula can be derived if $DvarPhi$ has constant rank in a neighborhood of $x$).
More precisely, we have
$$ I!I(x)(u,v) = pm DvarPhi(x)^dagger , D^2varPhi(x)(u,v) quad textfor all $u,,v in T_xM = operatornameker(DvarPhi(x))$$$
as $I!I(x)(u,v)$ is not really meaningful for non-tangent vectors $u, , v not in T_xM$.
This can be obtained as follows:
æ = x, y [Function] x^2 + y^2 + x y + c;
Dæ = D[æ[x, y], x, y, 1];
DDæ = D[æ[x, y], x, y, 2];
II = Transpose[LinearSolve[Dæ. Transpose [Dæ], Dæ]].DDæ
In this 2-dimensional example, the curvature $kappa$ of the level set at point $(x,y)$ should be (up to sign) computable as
ý = Dæ[[1]]/Sqrt[Total[Dæ^2, 2]];
à= RotationMatrix[Pi/2].ý
ú = ý.(II.ÃÂ).à// Simplify
(6 (x^2 + x y + y^2))/(5 x^2 + 8 x y + 5 y^2)^(3/2)
Here, ý
is the normal to the levelset (point upwards with respect to the function æ
) and ÃÂ
is the tangent obtained by counterclockwise 90-degree-rotation of ý
.
add a comment |Â
up vote
1
down vote
IIRC, the second fundamental form $I!I$ of a levelset $M = varPhi^-1(0)$ of a mapping $varPhi colon mathbbR^n to mathbbR^m$, $m<n$ at point $x in mathbbR^n$ is given (up to sign that I use to mix up) by
$$ I!I(x) = pm DvarPhi(x)^dagger , D^2varPhi(x),$$
where $DvarPhi(x)^dagger$ denotes the Moore-Penrose pseudoinverse of the Jacobian $DvarPhi(x)$ of $varPhi$. Here, I assume that $DvarPhi(x)$ is surjective (but a similar formula can be derived if $DvarPhi$ has constant rank in a neighborhood of $x$).
More precisely, we have
$$ I!I(x)(u,v) = pm DvarPhi(x)^dagger , D^2varPhi(x)(u,v) quad textfor all $u,,v in T_xM = operatornameker(DvarPhi(x))$$$
as $I!I(x)(u,v)$ is not really meaningful for non-tangent vectors $u, , v not in T_xM$.
This can be obtained as follows:
æ = x, y [Function] x^2 + y^2 + x y + c;
Dæ = D[æ[x, y], x, y, 1];
DDæ = D[æ[x, y], x, y, 2];
II = Transpose[LinearSolve[Dæ. Transpose [Dæ], Dæ]].DDæ
In this 2-dimensional example, the curvature $kappa$ of the level set at point $(x,y)$ should be (up to sign) computable as
ý = Dæ[[1]]/Sqrt[Total[Dæ^2, 2]];
à= RotationMatrix[Pi/2].ý
ú = ý.(II.ÃÂ).à// Simplify
(6 (x^2 + x y + y^2))/(5 x^2 + 8 x y + 5 y^2)^(3/2)
Here, ý
is the normal to the levelset (point upwards with respect to the function æ
) and ÃÂ
is the tangent obtained by counterclockwise 90-degree-rotation of ý
.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
IIRC, the second fundamental form $I!I$ of a levelset $M = varPhi^-1(0)$ of a mapping $varPhi colon mathbbR^n to mathbbR^m$, $m<n$ at point $x in mathbbR^n$ is given (up to sign that I use to mix up) by
$$ I!I(x) = pm DvarPhi(x)^dagger , D^2varPhi(x),$$
where $DvarPhi(x)^dagger$ denotes the Moore-Penrose pseudoinverse of the Jacobian $DvarPhi(x)$ of $varPhi$. Here, I assume that $DvarPhi(x)$ is surjective (but a similar formula can be derived if $DvarPhi$ has constant rank in a neighborhood of $x$).
More precisely, we have
$$ I!I(x)(u,v) = pm DvarPhi(x)^dagger , D^2varPhi(x)(u,v) quad textfor all $u,,v in T_xM = operatornameker(DvarPhi(x))$$$
as $I!I(x)(u,v)$ is not really meaningful for non-tangent vectors $u, , v not in T_xM$.
This can be obtained as follows:
æ = x, y [Function] x^2 + y^2 + x y + c;
Dæ = D[æ[x, y], x, y, 1];
DDæ = D[æ[x, y], x, y, 2];
II = Transpose[LinearSolve[Dæ. Transpose [Dæ], Dæ]].DDæ
In this 2-dimensional example, the curvature $kappa$ of the level set at point $(x,y)$ should be (up to sign) computable as
ý = Dæ[[1]]/Sqrt[Total[Dæ^2, 2]];
à= RotationMatrix[Pi/2].ý
ú = ý.(II.ÃÂ).à// Simplify
(6 (x^2 + x y + y^2))/(5 x^2 + 8 x y + 5 y^2)^(3/2)
Here, ý
is the normal to the levelset (point upwards with respect to the function æ
) and ÃÂ
is the tangent obtained by counterclockwise 90-degree-rotation of ý
.
IIRC, the second fundamental form $I!I$ of a levelset $M = varPhi^-1(0)$ of a mapping $varPhi colon mathbbR^n to mathbbR^m$, $m<n$ at point $x in mathbbR^n$ is given (up to sign that I use to mix up) by
$$ I!I(x) = pm DvarPhi(x)^dagger , D^2varPhi(x),$$
where $DvarPhi(x)^dagger$ denotes the Moore-Penrose pseudoinverse of the Jacobian $DvarPhi(x)$ of $varPhi$. Here, I assume that $DvarPhi(x)$ is surjective (but a similar formula can be derived if $DvarPhi$ has constant rank in a neighborhood of $x$).
More precisely, we have
$$ I!I(x)(u,v) = pm DvarPhi(x)^dagger , D^2varPhi(x)(u,v) quad textfor all $u,,v in T_xM = operatornameker(DvarPhi(x))$$$
as $I!I(x)(u,v)$ is not really meaningful for non-tangent vectors $u, , v not in T_xM$.
This can be obtained as follows:
æ = x, y [Function] x^2 + y^2 + x y + c;
Dæ = D[æ[x, y], x, y, 1];
DDæ = D[æ[x, y], x, y, 2];
II = Transpose[LinearSolve[Dæ. Transpose [Dæ], Dæ]].DDæ
In this 2-dimensional example, the curvature $kappa$ of the level set at point $(x,y)$ should be (up to sign) computable as
ý = Dæ[[1]]/Sqrt[Total[Dæ^2, 2]];
à= RotationMatrix[Pi/2].ý
ú = ý.(II.ÃÂ).à// Simplify
(6 (x^2 + x y + y^2))/(5 x^2 + 8 x y + 5 y^2)^(3/2)
Here, ý
is the normal to the levelset (point upwards with respect to the function æ
) and ÃÂ
is the tangent obtained by counterclockwise 90-degree-rotation of ý
.
edited 8 mins ago
answered 14 mins ago
Henrik Schumacher
43.5k263129
43.5k263129
add a comment |Â
add a comment |Â
Some_guy is a new contributor. Be nice, and check out our Code of Conduct.
Some_guy is a new contributor. Be nice, and check out our Code of Conduct.
Some_guy is a new contributor. Be nice, and check out our Code of Conduct.
Some_guy is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f185158%2fcalculating-curvature-of-a-contour%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You could solve your equation for
y
, then differentiate.â b.gatessucks
1 hour ago
Have you tried anything? Rules require you to show a minimal familiarity with Mathematica.
â Kubaâ¦
1 hour ago
@b.gatessucks How do I do that.. I used D[Solve[f(x,y)=f(c)] but it returns 0 -> InverseFunction[fs,2,2]^(1,0)[t,0]
â Some_guy
1 hour ago
Start by solving your
ftest
fory
.â b.gatessucks
1 hour ago
1
So your implicit function is something like ` f[x,y]:= x^2 + y^2 + x y - 3/4==0` ?
â Ulrich Neumann
1 hour ago