## calculus – Solve this differential equation when \$y(0)=1\$

Let $$y”-xy=0$$, $$y(0)=alpha$$, $$y'(0)=beta$$. Also, $$y=sum_{n=0}^{infty}a_n x^n$$ is a solution to y.

Is this differential equation first order linear? And if $$alpha=1$$, $$beta=0$$, then does $$a_0=1, a_1=0$$? (recall that $$a_n$$ is the series)

For the first question, my answer is yes. Also if $$alpha=0, beta=0$$, then $$y(0)=1, y'(0)=0$$. I’m not really sure how $$alpha, beta$$ are related to the equation, but my intuition tells me that this is true. Intuitions are not really that reliable so I wanted to verify if this is true or not.

## 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}}
``````

## Linear equation – matricies

Hello I am Dr. William from Cansas and here is my question. Every answers opinion are welcome.

Consider the linear equation System Ax=b where;

Question Image

## equation solving – Is it possible to ask Mathematica to give all the roots of the given function?

``````sol = x /. Solve(36 Cos((3 x)/4) Cos((27 x)/20) (Cos((3 x)/5) + 2 Cos((21 x)/10)) == 0&& 0 < x < 4 Pi)

Plot(36 Cos((3 x)/4) Cos((27 x)/20) (Cos((3 x)/5) +
2 Cos((21 x)/10)), {x, 0, 4 Pi},
Epilog -> {Red,
Point(Transpose({sol, ConstantArray(0, Length@sol)}))})
``````

If you desire only roots that are rational multiples of Pi, you can use (among many other ways):

``````Select(sol, #/Pi (Element) Rationals &)
``````

## Can Mathematica solve this exponential equation

My version (12.1.0.0 Student Edition) does not solve this equation:

``````Solve(Exp (-n^2/(2 m)) <= 3/4, m)
``````

WolframAlpha finds the solutions, but only for integer n? https://www.wolframalpha.com/input/?i=exp%28-n%5E2+%2F+%282m%29%29+%3C%3D+3%2F4%2C+solve+for+m

## Find the numerical value of the equation

B) Given that $$2x^2-3/x^2-4x+4 = 2 + A/x-2 + B/(x-2)^2$$

(i) Find the numerical value of A and B.

(ii) Hence, or otherwise, determine the stationary points and the nature.

(iii) Determine the point of inflexion on the graph.

## equation solving – How to solve this inequality with Reduce or Solve?

I need to solve this inequality:

``````Reduce(-(1/(lamda*beta*(1 - d)))*
Log((delta - beta (1 - 2 d))/(lamda*delta)) < d && 0 < lamda < 1 &&
0 < beta < 1 && 0 < delta < beta/(1 - lamda) &&
Max((beta - delta)/(2 beta); 0) <
d < (beta - delta + lamda*delta)/(2*beta), d, Reals)
``````

But Reduce doesn’t work for this..neither does solve
(“This system cannot be solved with the methods available to Solve.”)

One can analytically show that there exists a d_0 in ) Max((beta – delta)/(2 beta); 0) ; beta – delta + lamdadelta)/(2beta)( such that:

-(1/(lamda* beta*(1 – d)))*
Log((delta – beta (1 – 2 d))/(lamda *delta)) < d on )d_0; beta – delta + lamda delta)/(2beta)(.

and

-(1/(lamda* beta*(1 – d)))*
Log((delta – beta (1 – 2 d))/(lamda *delta)) > d on ) Max((beta – delta)/(2 beta); 0) ; d_0(.

But,
What i actually want to understand is why neither Reduce or Solve works for this kind of problem ?

## equation solving – Decomposing polynomial as a sum of polynomials multiples of two polynomials

Suppose that I have a polynomial $$f(s,t)$$ with coefficients in $$R=mathbb{R}(x_{1},dots, x_{n})$$ and in the variables $$s,t$$ and I know that $$f(s,t)$$ can be expressed as $$(s-t)f(s,t)=p(s,t)h(s)+q(s,t)h(t)$$ with $$h$$ having coefficients also in R (so these coeffcients are actually polynomials) but I do not know who are $$p,qin R(s,t)$$. How can I make Mathematica solve the equation $$(s-t)f(s,t)=p(s,t)h(s)+q(s,t)h(t)$$ finding the polynomials $$p,q$$ in the variables $$s,t$$ with polynomials coefficients in $$R$$? Thanks!

## Solving an ordinary differential equation with boundary condition at infinity

I want to solve the following differential equation

$$R^{primeprime}(r)+frac{1}{r}R^{prime}-R(r)+R(r)^{3}=0$$

subject to the boundary conditions

$$R^{prime}(0)=0qquadlim_{rtoinfty}R(r)=0$$
The solution for R subject to these boundary conditions is known as Townes soliton. I have tried to use NSolve as shown in the example solved here: https://mathematica.stackexchange.com/a/156362/73726 but I am struggling to understand how the boundary condition at infinity is implemented. In addition, how do I make some plots of $$R(r)$$ afterwards.