Determine vector equation from parametric equations [closed] - vector

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm really struggling with a problem at the moment. The problem is to find the equation for the plane that passes through the point (1,1,1) and is parallel to x - 3y - 2z - 4 = 0.
I have determined the direction vector as (1, -3, -2) and then I calculated the parametric equations as these:
x(t) = t + 1
y(t) = 1 - 3t
z(t) = 1 - 2t
But now I can't figure out how to determine the equation of the plane from those equations. Any help would be greatly appreciated! Thanks in advance.

This is a math question, not a programming question. You should ask it on math.stackexchange.com.
But since it's so simple, I'll just tell you how to solve it here.
You started with the plane equation x - 3y - 2z - 4 = 0. Any plane with the equation x - 3y - 2z + C = 0 (for any real number C) is parallel to your original plane.
So if you want the equation of a parallel plane passing through (1,1,1), just plug (1,1,1) into to the equation with C and then solve for C.
1 - 3*1 - 2*1 - C = 0
C = 3 + 2 - 1 = 4
So the equation of the parallel plane is x - 3y - 2z + 4 = 0.

Related

What is "h" in numerical differentiation? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
I would like to know what h from the numerical differentiation formulas is and how I can calculate it when I have a function.
I am speaking about this formulas:
f'(x0) = (f(x0 + h) - f(x0)) / h
f'(x0) = (f(x0) - f(x0 - h)) / h
f'(x0) = (f(x0 + h) - f(x0 - h)) / 2*h
I would really appreciate any kind of help!
In such formulae h is usually a "very small number", similar to epsilon in Calculus.
For example, the derivative of f at a is defined as:
Note how h is defined as approaching 0.
When programming, e.g. doing numerical gradient computation, it usually works to set h to something very small - many programming environments have an "epsilon" quantity; lacking that, you can just use a very small floating-point number.
Using the usual 8 byte floats, sensible values for h are 1e-8 for the first and second formula and 1e-5 for the third central difference quotient. This is valid for medium values of x, for larger x one would have to include the scale of x in some way.
In general, for a kth order difference quotient with error order p, the balance between floating point noise and numerical error is reached for h about pow(2e-16, 1.0/(p+k)).

how to solve 50 noodles/shoelaces puzzle? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
There are 50 noodles in a bowl. You can tie two ends of either one noodle or two different noodles, forming a nod.
Q: What is the expected value of number of loops we can have in the bowl?
∑(1/i) for i from 1 to 50.
When you have n noodles lets take a look at noodle number n. It can either be tied to itself with probability 1/n or some other noodle with probability (n-1)/n. When it gets tied to itself the loop is formed and we need to find the expected value for the rest n-1 noodles. When it gets tied to some other noodle then it is the same as we have taken away this noodle so the answer is expected value for the rest n-1 noodles.
f(n) = 1/n * (f(n-1) + 1) + (n-1)/n * f(n-1);
f(n) = 1/n * f(n-1) + 1/n + (n-1)/n * f(n-1);
f(n) = f(n-1) + 1/n
f(n) = 1 + 1/2 + ... + 1/n

equivalence of equations [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
A reviewer of a paper I submitted to a scientific journal insists that my function
f1[b_, c_, t_] := 1 - E^((c - t)/b)/2
is "mathematically equivalent" to the function
f2[b0_, b1_, t_] := 1 - b0 E^(-b1 t)
He insists
While the models might appear(superficially) to be different, the f1
model is merely a re-parameterisation of the f2 model, and this can be
seen easily using highschool mathematics.
I survived High School, but I don't see the equivalence, and FullSimplify does not yield the same results. Perhaps I am misunderstanding FullSimplify. Is there a way to authoritatively refute or confirm the assertion of the reviewer?
If c and b are constant, you can factor them out relatively easily given the property of the power operator:
e^(A + B) = e^A x e^B...
so
e^((c - t)/b) = e^(c/b - t/b) = e^(c/b) x e^(-t/b) = b0 x e^(-t/b)
The latter expression is commonly used to simplify linear differential equation.

Algorithm for Solving a Linear Combination? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have run into the following problem that I need to solve in a project that I'm working on:
Given some number of vectors v_i (in the math sense), and a target vector H, compute a linear combination of the vectors v_i that most closely matches the target vector H, with the constraint that the coefficients must be in [0, 1].
I do not know much about what kind of algorithms / math should be used to approach such a problem. Any prods in the right general direction would be much appreciated!
It's a constrained least square problem. Basically you want to solve the optimization problem:
argmin ||Ax-H||
x
s.t. 0<=x_j<=1
where x=(x_1, ..., x_j, ..., x_n) consists the coefficients you are seeking, and a column of A corresponds to a vector v_i.
Assuming that you want to solve in the least squares sense, then you have a quadratic programming problem. For example, say that your set of vectors is
x1 = 1 2 3]' x2 = [3 2 1]'
and your target vector is
H = [1 -1 1]'
Then you can create the matrix whose columns are your vectors:
A = [1 3;
2 2;
3 1]
and the thing you are trying to minimize is
norm(A*x - H) = (A*x - H)' * (A*x - H) = x' * (A'*A) * x - (2*H'*A) * x + const
If you define
B = A' * A
C = -2 * H' * A
then you have a problem that can be solved optimally my Matlab's quadprog function
quadprog(B,C,[],[],[],[],0,1)
ans =
0.16667
0.16667
so the optimal solution in this case is
1/6 * x1 + 1/6 * x2 = [2/3, 2/3, 2/3]
This is a combinatorial optimization problem. This kind of problems are NP-hard. But I guess for the binary one, there should be polynomial algorithms that can solve, or there may be some relaxation to get an approximate solution. Some googling on "integer programming" may help.

Finding Multiplier Matrix [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to find unknown matrix multiply matrix with knowing matrix
A*c=b
where b is defined vector, A is defined matrix 8x8, c is unknown vector.
I know, I can not divide matrix but what is the solution for this situation ??
This is basically a system of simultaneous linear equations. You can solve it using Gaussian elimination.
As for matrix "division", what you really have in mind is an inverse matrix, i.e. a matrix A-1 such that
AA-1=A-1A=I
where I is the identity matrix. If A is invertible then A*c=b is equivalent to c=A-1b.
The answer by Adam is certainly correct, but you should know that calculating the inverse of the matrix might not be the best solution.
Another to look into is LU decomposition and forward-back substitution. It will be more computationally stable that full Gaussian elimination and calculating the inverse.
You solve the problem in steps like this:
Decompose A = LU; now you'll have LUc = b. L is lower triangular; U is upper triangular.
Let y = Uc; solve Ly = b for y.
Now that you have y, solve for the c vector you want: y = Uc.

Resources