Solving a System of Vector Equations
$begingroup$
I'm trying to solve a system of vector equations, but I have no idea how to do it. The following is a basic example of what I'm trying to solve:
$p = a*x + b*y$
$x = (p - y).normalize() + z$
where p, x, y, and z are 3D vectors.
I want to be able to solve this without making it a system of six equations by writing out how to evaluate the normalize function. I'm fine with solving three pairs of a system of two equations (one for each component of the vector) as long as I can solve the system of two equations once for one component and then input the corresponding values for the other two components.
My Original Problem
I want to take the formula for the force of a spring ($F_k = -kx$) and combine it wither Newton's second law ($F = ma$) and the kinematic formula ($p_{new} = p_{old} + v_{old} * t + frac{1}{2} at^2$) to get a formula for the positions for two masses connected by a spring after a certain amount of time given their start positions and velocities.
$p = p_o + v_o * t + frac{at^2}{2}$ (kinematic formula for the first end of the spring)
$q = q_o + w_o * t + frac{a_2t^2}{2}$ (kinematic formula for the second end of the spring)
The force on both ends of the springs are equal opposites, so
$a = F_k / m$ where m is the mass of the first end
$a_2 = - F_k / n$ where n is the mass of the second end
Then you can replace $a$ and $a_2$ with their values in the first two equations:
$p = p_o + v_o * t + frac{F_kt^2}{2m}$
$q = q_o + w_o * t - frac{F_kt^2}{2n}$
Using Hooke's law, we can calculate the force
$F_k = -kx$
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t + frac{kx_2t^2}{2n}$
$x$ is the distance vector between the mass and the equilibrium of the spring. For example, if the spring at rest has a length of 10, then $x$ would be the distance vector between the end of the spring and 10 length units from the other end. In other words, $x$ is the distance between the ends of the spring minus the normal length of the spring (10)
$x = (p - q) - l$
However, $(p - q)$ is a vector, and $l$ is a scalar. The direction of $l$ should be the same as $(p - q)$. Therefore, the equation should be
$x = (p - q) - (p - q).normalize() * l$
Actually, this is the $x$ for the first end of the spring (since $p - q$ points toward the second end). However, the $x$ for the other end will just be $-x_1$
So we get
Final System of Equations
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t - frac{kxt^2}{2n}$ I replaced $x_2$ with $-x$
$x = (p - 1) - (p - q).normalize() * l$
(PS. Please tell me if I made any errors forming this. I seem to come up with something slightly different each time. So I may have made a mistake)
vectors systems-of-equations norm
$endgroup$
add a comment |
$begingroup$
I'm trying to solve a system of vector equations, but I have no idea how to do it. The following is a basic example of what I'm trying to solve:
$p = a*x + b*y$
$x = (p - y).normalize() + z$
where p, x, y, and z are 3D vectors.
I want to be able to solve this without making it a system of six equations by writing out how to evaluate the normalize function. I'm fine with solving three pairs of a system of two equations (one for each component of the vector) as long as I can solve the system of two equations once for one component and then input the corresponding values for the other two components.
My Original Problem
I want to take the formula for the force of a spring ($F_k = -kx$) and combine it wither Newton's second law ($F = ma$) and the kinematic formula ($p_{new} = p_{old} + v_{old} * t + frac{1}{2} at^2$) to get a formula for the positions for two masses connected by a spring after a certain amount of time given their start positions and velocities.
$p = p_o + v_o * t + frac{at^2}{2}$ (kinematic formula for the first end of the spring)
$q = q_o + w_o * t + frac{a_2t^2}{2}$ (kinematic formula for the second end of the spring)
The force on both ends of the springs are equal opposites, so
$a = F_k / m$ where m is the mass of the first end
$a_2 = - F_k / n$ where n is the mass of the second end
Then you can replace $a$ and $a_2$ with their values in the first two equations:
$p = p_o + v_o * t + frac{F_kt^2}{2m}$
$q = q_o + w_o * t - frac{F_kt^2}{2n}$
Using Hooke's law, we can calculate the force
$F_k = -kx$
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t + frac{kx_2t^2}{2n}$
$x$ is the distance vector between the mass and the equilibrium of the spring. For example, if the spring at rest has a length of 10, then $x$ would be the distance vector between the end of the spring and 10 length units from the other end. In other words, $x$ is the distance between the ends of the spring minus the normal length of the spring (10)
$x = (p - q) - l$
However, $(p - q)$ is a vector, and $l$ is a scalar. The direction of $l$ should be the same as $(p - q)$. Therefore, the equation should be
$x = (p - q) - (p - q).normalize() * l$
Actually, this is the $x$ for the first end of the spring (since $p - q$ points toward the second end). However, the $x$ for the other end will just be $-x_1$
So we get
Final System of Equations
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t - frac{kxt^2}{2n}$ I replaced $x_2$ with $-x$
$x = (p - 1) - (p - q).normalize() * l$
(PS. Please tell me if I made any errors forming this. I seem to come up with something slightly different each time. So I may have made a mistake)
vectors systems-of-equations norm
$endgroup$
$begingroup$
$x$ is clearly a multiple of $p$, so if nonzero they are parallel. If $y$ is also nonzero and not parallel to $x$, then $b$ must be zero.
$endgroup$
– amd
Jan 6 at 22:07
$begingroup$
@amid interesting, but that unfortunately won't help with my original problem. I'll change $x = p.normalize()$ to $x = p.normalize + z$ so that $x$ and $p$ don't have to be parallel.
$endgroup$
– ElliotThomas
Jan 6 at 22:20
$begingroup$
Perhaps you might provide a description of the problem that you’re actually trying to solve for context instead of introducing more mysterious unexplained variables into your question.
$endgroup$
– amd
Jan 6 at 22:23
$begingroup$
@amid alright, I'll do that.
$endgroup$
– ElliotThomas
Jan 6 at 22:27
add a comment |
$begingroup$
I'm trying to solve a system of vector equations, but I have no idea how to do it. The following is a basic example of what I'm trying to solve:
$p = a*x + b*y$
$x = (p - y).normalize() + z$
where p, x, y, and z are 3D vectors.
I want to be able to solve this without making it a system of six equations by writing out how to evaluate the normalize function. I'm fine with solving three pairs of a system of two equations (one for each component of the vector) as long as I can solve the system of two equations once for one component and then input the corresponding values for the other two components.
My Original Problem
I want to take the formula for the force of a spring ($F_k = -kx$) and combine it wither Newton's second law ($F = ma$) and the kinematic formula ($p_{new} = p_{old} + v_{old} * t + frac{1}{2} at^2$) to get a formula for the positions for two masses connected by a spring after a certain amount of time given their start positions and velocities.
$p = p_o + v_o * t + frac{at^2}{2}$ (kinematic formula for the first end of the spring)
$q = q_o + w_o * t + frac{a_2t^2}{2}$ (kinematic formula for the second end of the spring)
The force on both ends of the springs are equal opposites, so
$a = F_k / m$ where m is the mass of the first end
$a_2 = - F_k / n$ where n is the mass of the second end
Then you can replace $a$ and $a_2$ with their values in the first two equations:
$p = p_o + v_o * t + frac{F_kt^2}{2m}$
$q = q_o + w_o * t - frac{F_kt^2}{2n}$
Using Hooke's law, we can calculate the force
$F_k = -kx$
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t + frac{kx_2t^2}{2n}$
$x$ is the distance vector between the mass and the equilibrium of the spring. For example, if the spring at rest has a length of 10, then $x$ would be the distance vector between the end of the spring and 10 length units from the other end. In other words, $x$ is the distance between the ends of the spring minus the normal length of the spring (10)
$x = (p - q) - l$
However, $(p - q)$ is a vector, and $l$ is a scalar. The direction of $l$ should be the same as $(p - q)$. Therefore, the equation should be
$x = (p - q) - (p - q).normalize() * l$
Actually, this is the $x$ for the first end of the spring (since $p - q$ points toward the second end). However, the $x$ for the other end will just be $-x_1$
So we get
Final System of Equations
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t - frac{kxt^2}{2n}$ I replaced $x_2$ with $-x$
$x = (p - 1) - (p - q).normalize() * l$
(PS. Please tell me if I made any errors forming this. I seem to come up with something slightly different each time. So I may have made a mistake)
vectors systems-of-equations norm
$endgroup$
I'm trying to solve a system of vector equations, but I have no idea how to do it. The following is a basic example of what I'm trying to solve:
$p = a*x + b*y$
$x = (p - y).normalize() + z$
where p, x, y, and z are 3D vectors.
I want to be able to solve this without making it a system of six equations by writing out how to evaluate the normalize function. I'm fine with solving three pairs of a system of two equations (one for each component of the vector) as long as I can solve the system of two equations once for one component and then input the corresponding values for the other two components.
My Original Problem
I want to take the formula for the force of a spring ($F_k = -kx$) and combine it wither Newton's second law ($F = ma$) and the kinematic formula ($p_{new} = p_{old} + v_{old} * t + frac{1}{2} at^2$) to get a formula for the positions for two masses connected by a spring after a certain amount of time given their start positions and velocities.
$p = p_o + v_o * t + frac{at^2}{2}$ (kinematic formula for the first end of the spring)
$q = q_o + w_o * t + frac{a_2t^2}{2}$ (kinematic formula for the second end of the spring)
The force on both ends of the springs are equal opposites, so
$a = F_k / m$ where m is the mass of the first end
$a_2 = - F_k / n$ where n is the mass of the second end
Then you can replace $a$ and $a_2$ with their values in the first two equations:
$p = p_o + v_o * t + frac{F_kt^2}{2m}$
$q = q_o + w_o * t - frac{F_kt^2}{2n}$
Using Hooke's law, we can calculate the force
$F_k = -kx$
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t + frac{kx_2t^2}{2n}$
$x$ is the distance vector between the mass and the equilibrium of the spring. For example, if the spring at rest has a length of 10, then $x$ would be the distance vector between the end of the spring and 10 length units from the other end. In other words, $x$ is the distance between the ends of the spring minus the normal length of the spring (10)
$x = (p - q) - l$
However, $(p - q)$ is a vector, and $l$ is a scalar. The direction of $l$ should be the same as $(p - q)$. Therefore, the equation should be
$x = (p - q) - (p - q).normalize() * l$
Actually, this is the $x$ for the first end of the spring (since $p - q$ points toward the second end). However, the $x$ for the other end will just be $-x_1$
So we get
Final System of Equations
$p = p_o + v_o * t - frac{kxt^2}{2m}$
$q = q_o + w_o * t - frac{kxt^2}{2n}$ I replaced $x_2$ with $-x$
$x = (p - 1) - (p - q).normalize() * l$
(PS. Please tell me if I made any errors forming this. I seem to come up with something slightly different each time. So I may have made a mistake)
vectors systems-of-equations norm
vectors systems-of-equations norm
edited Jan 7 at 1:22
ElliotThomas
asked Jan 6 at 21:36
ElliotThomasElliotThomas
186
186
$begingroup$
$x$ is clearly a multiple of $p$, so if nonzero they are parallel. If $y$ is also nonzero and not parallel to $x$, then $b$ must be zero.
$endgroup$
– amd
Jan 6 at 22:07
$begingroup$
@amid interesting, but that unfortunately won't help with my original problem. I'll change $x = p.normalize()$ to $x = p.normalize + z$ so that $x$ and $p$ don't have to be parallel.
$endgroup$
– ElliotThomas
Jan 6 at 22:20
$begingroup$
Perhaps you might provide a description of the problem that you’re actually trying to solve for context instead of introducing more mysterious unexplained variables into your question.
$endgroup$
– amd
Jan 6 at 22:23
$begingroup$
@amid alright, I'll do that.
$endgroup$
– ElliotThomas
Jan 6 at 22:27
add a comment |
$begingroup$
$x$ is clearly a multiple of $p$, so if nonzero they are parallel. If $y$ is also nonzero and not parallel to $x$, then $b$ must be zero.
$endgroup$
– amd
Jan 6 at 22:07
$begingroup$
@amid interesting, but that unfortunately won't help with my original problem. I'll change $x = p.normalize()$ to $x = p.normalize + z$ so that $x$ and $p$ don't have to be parallel.
$endgroup$
– ElliotThomas
Jan 6 at 22:20
$begingroup$
Perhaps you might provide a description of the problem that you’re actually trying to solve for context instead of introducing more mysterious unexplained variables into your question.
$endgroup$
– amd
Jan 6 at 22:23
$begingroup$
@amid alright, I'll do that.
$endgroup$
– ElliotThomas
Jan 6 at 22:27
$begingroup$
$x$ is clearly a multiple of $p$, so if nonzero they are parallel. If $y$ is also nonzero and not parallel to $x$, then $b$ must be zero.
$endgroup$
– amd
Jan 6 at 22:07
$begingroup$
$x$ is clearly a multiple of $p$, so if nonzero they are parallel. If $y$ is also nonzero and not parallel to $x$, then $b$ must be zero.
$endgroup$
– amd
Jan 6 at 22:07
$begingroup$
@amid interesting, but that unfortunately won't help with my original problem. I'll change $x = p.normalize()$ to $x = p.normalize + z$ so that $x$ and $p$ don't have to be parallel.
$endgroup$
– ElliotThomas
Jan 6 at 22:20
$begingroup$
@amid interesting, but that unfortunately won't help with my original problem. I'll change $x = p.normalize()$ to $x = p.normalize + z$ so that $x$ and $p$ don't have to be parallel.
$endgroup$
– ElliotThomas
Jan 6 at 22:20
$begingroup$
Perhaps you might provide a description of the problem that you’re actually trying to solve for context instead of introducing more mysterious unexplained variables into your question.
$endgroup$
– amd
Jan 6 at 22:23
$begingroup$
Perhaps you might provide a description of the problem that you’re actually trying to solve for context instead of introducing more mysterious unexplained variables into your question.
$endgroup$
– amd
Jan 6 at 22:23
$begingroup$
@amid alright, I'll do that.
$endgroup$
– ElliotThomas
Jan 6 at 22:27
$begingroup$
@amid alright, I'll do that.
$endgroup$
– ElliotThomas
Jan 6 at 22:27
add a comment |
0
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',
autoActivateHeartbeat: false,
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
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3064409%2fsolving-a-system-of-vector-equations%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3064409%2fsolving-a-system-of-vector-equations%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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
$begingroup$
$x$ is clearly a multiple of $p$, so if nonzero they are parallel. If $y$ is also nonzero and not parallel to $x$, then $b$ must be zero.
$endgroup$
– amd
Jan 6 at 22:07
$begingroup$
@amid interesting, but that unfortunately won't help with my original problem. I'll change $x = p.normalize()$ to $x = p.normalize + z$ so that $x$ and $p$ don't have to be parallel.
$endgroup$
– ElliotThomas
Jan 6 at 22:20
$begingroup$
Perhaps you might provide a description of the problem that you’re actually trying to solve for context instead of introducing more mysterious unexplained variables into your question.
$endgroup$
– amd
Jan 6 at 22:23
$begingroup$
@amid alright, I'll do that.
$endgroup$
– ElliotThomas
Jan 6 at 22:27