## equation – Evaluating a time dependent variable out of NDsolve/in NDsolve without affecting the result

this is my first question here.
I am having trouble, I might be able to express what I want in Matlab but I suffer to do that in Mathematica.
So I have a direction cosine matrix that is solved in NDsolve. I have a vector, say vec(0)={1,0,0}. I want to have these initial conditions and do a time marching to this vector (i.e. multiply it with my direction cosine matrix which is also time-dependent, and as mentioned solved in NDsolve). In the end, I want to create an animation of that vector.
I tried to put x’ (first component of vector), y’, and z’ expression in the NDsolve where I get the components of direction cosine (please do not confuse it with built-in direction cosine it has nothing to do with my assignment); but it turned out that putting x’, y’, z’ somehow managed to mess up my solution.
I am open to brand new approach to obtain this vector.
I add last part of my code below.

tmax = 10
m = 4
lx = 0.3
ly = 0.1
lz = 0.1
eqnplotorig = {Derivative(1)((Theta)x)(t) ==
Sec((Theta)y(t)) (Cos((Theta)z(t)) (Omega)x(t) -
Sin((Theta)z(t)) (Omega)y(t)),
Derivative(1)((Theta)y)(t) ==
Sin((Theta)z(t)) (Omega)x(t) + Cos((Theta)z(t)) (Omega)y(t),
Derivative(1)((Theta)z)(
t) == -Cos((Theta)z(t)) Tan((Theta)y(t)) (Omega)x(t) +
Sin((Theta)z(t)) Tan((Theta)y(t)) (Omega)y(t) + (Omega)z(t),
Derivative(1)((Omega)x)(
t) == (36 lx^2 ly lz (ly^2 - lz^2) (Omega)x(t)^2 -
3 lx (Omega)x(
t) ((9 ly^4 lz + 22 ly^2 lz^3 - 3 lz^5 -
lx^2 (11 ly^2 lz + 3 lz^3)) (Omega)y(t) +
ly (3 ly^4 - 22 ly^2 lz^2 - 9 lz^4 +
lx^2 (3 ly^2 + 11 lz^2)) (Omega)z(t)) -
4 (-3 ly (lx^2 - 2 ly^2) lz (lx^2 + lz^2) (Omega)y(t)^2 +
2 (lx^2 + ly^2) (ly^2 - lz^2) (lx^2 + lz^2) (Omega)y(
t) (Omega)z(t) +
3 ly (lx^2 + ly^2) lz (lx^2 - 2 lz^2) (Omega)z(
t)^2))/(5 lx^4 (ly^2 + lz^2) + 32 ly^2 lz^2 (ly^2 + lz^2) +
lx^2 (5 ly^4 - 62 ly^2 lz^2 + 5 lz^4)),
Derivative(1)((Omega)y)(
t) == (3 lx (5 lx^2 - 16 ly^2) lz (ly^2 + lz^2) (Omega)x(
t)^2 + (Omega)x(
t) (3 ly lz (lx^2 (-23 ly^2 + lz^2) +
12 (ly^2 + lz^2)^2) (Omega)y(
t) + (lx^2 + ly^2) (5 lx^2 + 12 ly^2 - 20 lz^2) (ly^2 +
lz^2) (Omega)z(t)) +
3 lx (3 ly^2 lz (-4 lx^2 + 3 ly^2 + 7 lz^2) (Omega)y(t)^2 +
ly (3 ly^4 + 20 ly^2 lz^2 + 9 lz^4 +
lx^2 (3 ly^2 - 13 lz^2)) (Omega)y(t) (Omega)z(
t) + (lx^2 + ly^2) lz (7 ly^2 - 5 lz^2) (Omega)z(
t)^2))/(5 lx^4 (ly^2 + lz^2) + 32 ly^2 lz^2 (ly^2 + lz^2) +
lx^2 (5 ly^4 - 62 ly^2 lz^2 + 5 lz^4)),
Derivative(1)((Omega)z)(
t) == (-3 lx ly (5 lx^2 - 16 lz^2) (ly^2 + lz^2) (Omega)x(
t)^2 - (Omega)x(
t) ((lx^2 + lz^2) (ly^2 + lz^2) (5 lx^2 - 20 ly^2 +
12 lz^2) (Omega)y(t) +
3 ly lz (lx^2 (ly^2 - 23 lz^2) +
12 (ly^2 + lz^2)^2) (Omega)z(t)) +
3 lx ((lx^2 + lz^2) (5 ly^3 - 7 ly lz^2) (Omega)y(t)^2 -
lz (9 ly^4 + 20 ly^2 lz^2 + 3 lz^4 +
lx^2 (-13 ly^2 + 3 lz^2)) (Omega)y(t) (Omega)z(t) -
3 ly lz^2 (-4 lx^2 + 7 ly^2 + 3 lz^2) (Omega)z(
t)^2))/(5 lx^4 (ly^2 + lz^2) + 32 ly^2 lz^2 (ly^2 + lz^2) +
lx^2 (5 ly^4 - 62 ly^2 lz^2 + 5 lz^4)), (Theta)x(0) ==
0, (Theta)y(0) == 0, (Theta)z(0) == 0, (Omega)x(0) ==
2 (Pi)/180, (Omega)y(0) == 2 (Pi)/180, (Omega)z(0) ==
2 (Pi)/180}
solplot3Dorig =
Flatten@NDSolve(
eqnplotorig, {(Theta)x, (Theta)y, (Theta)z, (Omega)x,
(Omega)y, (Omega)z}, {t, 0, tmax})
Plot(Evaluate({(Theta)x(t), (Theta)y(t), (Theta)z(t)} /.
solplot3Dorig), {t, 0, tmax},
PlotLegends ->
Placed({(Theta)x(t), (Theta)y(t), (Theta)z(t)}, {0.85, 0.55}))
Plot(Evaluate({(Omega)x(t), (Omega)y(t), (Omega)z(t)} /.
solplot3Dorig), {t, 0, tmax},
PlotLegends ->
Placed({(Omega)x(t), (Omega)y(t), (Omega)z(t)}, {0.85, 0.55}))

Here I solve theta values that will be used in my direction cosine matrix. Which is defined as :

Dirmat = {{1, 0, 0}, {0, Cos((Theta)x(t)), -Sin((Theta)x(t))}, {0,
Sin((Theta)x(t)), Cos((Theta)x(t))}} . {{Cos((Theta)y(t)), 0,
Sin((Theta)y(t))}, {0, 1, 0}, {-Sin((Theta)y(t)), 0,
Cos((Theta)y(t))}} . {{Cos((Theta)z(t)), -Sin((Theta)z(t)),
0}, {Sin((Theta)z(t)), Cos((Theta)z(t)), 0}, {0, 0, 1}}

So what I need is a “vec” vector variable time march that has some initial values like {1,0,0} (or whatever) and time march it so that I can animate it using “frames” or something like that.

Sorry, it was a long question.
Any help will be appreciated.

## equation solving – Why does Reduce give False on SameQ with its copy-pasted result?

If I evaluate

Reduce(#, x) & /@ {{4 x > 1, 2 x < 5}, {5 x > 1, x < 5}, {4 x > 1, x < 5}}

the result is

{1/4 < x < 5/2, 1/5 < x < 5, 1/4 < x < 5}

If I select the result and copy-paste it on a new line (that is, I am not typing by hand the inequalities) to compare it with SameQ

(Reduce(#, x) & /@ {{4 x > 1, 2 x < 5}, {5 x > 1, x < 5}, {4 x > 1,
x < 5}}) === {1/4 < x < 5/2, 1/5 < x < 5, 1/4 < x < 5}

I get False

Why is that so?

In particular, I found that out when using Length on the expressions

{Length /@ (Reduce(#, x) & /@ {{4 x > 1, 2 x < 5}, {5 x > 1,
x < 5}, {4 x > 1, x < 5}}),
Length /@ {1/4 < x < 5/2, 1/5 < x < 5, 1/4 < x < 5}}

which, surprisingly to me, leads to different results

{{5, 5, 5}, {3, 3, 3}}

## algorithms – How could a bank software intend to transfer \$82.56 but result in a error transfer of \$1,205,619.56

algorithms – How could a bank software intend to transfer \$82.56 but result in a error transfer of \$1,205,619.56 – Software Engineering Stack Exchange

## can one use epsilon in polynomial time reduction when proving the NP-hardness result?

Specifically, given a known NP-complete problem, whether we can construct an instance of the target problem which contains epsilon -> 0?

## Webform Computed Data Display Grade and Text based on result

I am building a quiz using webforms and the computed data twig and have a question if something is possible and if there is documentation on how to build this.

The quiz is 20 questions and each answer has a value of 1-5, I have all of the computed data working and it is able to show the final score properly, but was wonder if I could assign a grade and give short text feedback based on the score.

For example:
A user scores less than 70 they would receive a grade of “Below Average”, 70-80 Average and 81-100 “Above Average” and then some text giving them feedback on their score depending on this range they scored in. Is this possible to do in webforms?

Thank you so much for any help!

## calculus and analysis – How does Mathematica obtain this result?

FullSimplify(
Sqrt(2 (Pi)) InverseFourierTransform(1/(x^2 - a^2), x, p),
Element(a, Reals))

Gives the output

-(((Pi) Sign(p) Sin(a p))/a)

But

$$int_{-infty }^{infty } frac{e^{-i k x}}{x^2-a^2} , dx$$ is not a defined integration. Mathematica also returns undefined as answer if you compute it.

So, I am trying to understand how does Mathematica calculates that Fourier transform of the non-integrable function.

## MySQL statements return different result when executed inside function compared to executed directly

I am new to MySQL and I am observing a behaviour which I can not explain.
Running this function gets me a different result compared to the one I get when I run the statements without the function.

delimiter \$\$
DROP FUNCTION if exists query_dataset\$\$
CREATE FUNCTION query_dataset(sqm double, location varchar(45), floor int) returns double
BEGIN
declare suggestion double;

create temporary table temp
SELECT url,current_price,PERCENT_RANK() OVER (ORDER BY current_price) percentile_rank
FROM xenew.UNION_SALES
where
(sqm between sqm*0.8 and sqm*1.2
and Trim(location)=location
and floor between floor-1 and floor+1
and current_date >= now()-interval 3 month
and onlineDays_count>1
and current_Price>=5000);

SET suggestion = (select avg(current_price) from temp
where percentile_rank between 0.1 and 0.4);

drop temporary table temp;

return suggestion;
END\$\$
delimiter ;

select  query_dataset(60, 'Άλιμος', 1);

create temporary table tblemployee
SELECT url,current_price,PERCENT_RANK() OVER (ORDER BY current_price) percentile_rank
FROM xenew.UNION_SALES
where
(sqm between 60*0.8 and 60*1.2
and Trim(location)='Άλιμος'
and floor between 1-1 and 1+1
and current_date >= now()-interval 3 month
and onlineDays_count>1
and current_Price>=5000);

select avg(current_price) from tblemployee
where percentile_rank between 0.1 and 0.4;

drop temporary table tblemployee;

Am I missing something obvious? What could be the cause of this?
Thank you beforehand for any help.

## ERROR IN in my SPFX WebPart : Module parse failed: Unexpected token You may need an additional loader to handle the result of these loaders

I have created an SPFx project with reactJS. I am using .jsx extension – functional components.

Now, the spfx webpart is already working fine, but I saw a material kit that I want to reuse its components.

When I referenced the components, I am presented with this error

***Failed to load component (WebPart). Original error: ***Failed to load entry point from component WebPart). Original error: Module parse failed: Unexpected token (30:4)
File was processed with these loaders: