MaplePrimes Questions

I have an expression equal to the sum of N terms of the form Int(fn=1..N(x), x) and I want to replace each fn(x) by its Taylor (or series) expansion.

When the integrals are definite, like J1 below, I can easily obtain a new expression (K1) where the integrand has been replaced by some expansion.
But when the integral is indefinite, like J2, I get an evaluated expression for K2.

It seems I have to do some gymnastic (J3 --> K3) to get what I want

restart

J1 := Int(sin(p*x), x=0..1);
K1 := eval(J1, Int = ((a, b) -> Int(mtaylor(a, x=0, 5), b)));

Int(sin(p*x), x = 0 .. 1)

 

Int(p*x-(1/6)*p^3*x^3, x = 0 .. 1)

(1)

# undefined integration

J2 := Int(sin(p*x), x);

`Expected result` = Int(p*x-(1/6)*p^3*x^3, x);

K2 := eval(J2, Int = ((a, b) -> Int(mtaylor(a, x=0, 5), b)));

Int(sin(p*x), x)

 

`Expected result` = Int(p*x-(1/6)*p^3*x^3, x)

 

eval(Int(sin(p*x), x), {Int = (proc (a, b) options operator, arrow; Int(mtaylor(a, x = 0, 5), b) end proc)})

(2)

# undefined integration using Intat

J3 := Intat(op(1, J2), op(2, J2)=y);
eval(%, Intat = ((a, b) -> Intat(mtaylor(a, x=0, 5), b))):

K3 := IntegrationTools:-Change(convert(%, Int), y=x, x)

Intat(sin(p*x), x = y)

 

Int(p*x-(1/6)*p^3*x^3, x)

(3)
 

 

Download Integration.mw

Why do I get this unevaluatedform for K2?
Do I have to use Intat to get K3?

Thanks in advance

I want to make a list of ex, and in each of ex contains some item of enumerare. This is my code:

restart;
with(geometry);
mylist := [[-1, 9, -15], [1, -6, -15], [1, -6, 9], [1, 6, 12], [-2, 3, 12], [2, -9, 12], [-1, -6, -9], [-1, -9, -15], [1, 6, -15], [-2, 9, -12], [1, 3, 3], [-1, 6, -9], [3, -4, 2], [-5, 5, -2], [-3, -5, -4], [-2, 1, -3], [-5, -4, -2], [5, 5, 4], [-1, -2, -2], [-3, 1, -5]];
toX := s -> latex(s, output = string);
s := "";
for item in mylist do
    a := item[1];
    b := item[2];
    c := item[3];
    f := x -> a*x^3 + b*x^2 + c*x;
    sol := solve(diff(f(x), x) = 0, x);
    x1 := sol[1];
    x2 := sol[2];
    f2 := diff(f(x), x, x);
    if subs(x = x1, f2) < 0 then
        max_point := [x1, f(x1)];
    elif subs(x = x2, f2) < 0 then
        max_point := [x2, f(x2)];
    else
        max_point := "No maximum";
    end if;
    point(o, 0, 0);
    point(A, x1, f(x1));
    point(B, x2, f(x2));
    AB := simplify(distance(A, B));
    d := Equation(line(k, [A, B], [x, y]));
    lined := sort(sign(coeff(lhs(d), x))*d/igcd(coeff(lhs(d), x), coeff(lhs(d), y)));
    myr := distance(o, k);
    circle_eq := x^2 + y^2 = myr^2;
    s := cat(s, "\\begin{ex}\n", "  Given the function $y = ", toX(f(x)), "$.\n", "  \\begin{enumerate}[label=\\alph*)]\n", "    \\item The derivative of the function is $y'=", toX(diff(f(x), x)), "$.\n", "    \\item The maximum point of the function's graph is $P(", toX(max_point[1]), ", ", toX(max_point[2]), ")$.\n", "    \\item The equation of the line passing through the two extremum points of the graph is $", toX(lined), "$.\n", "    \\item The distance between the two extremum points $A$ and $B$ is $", toX(AB), "$.\n", "    \\item The equation of the circle with center at the origin and tangent to the line passing through the two extremum points is $", toX(circle_eq), "$.\n", "  \\end{enumerate}\n", "\\end{ex}\n\n");
end do;
printf("%s", s);


It seems there is a bug, I get a massage Error, (in geometry:-line) the line is not defined. 

How can I prepare it? and how can I reduce the code? 

Hi,

I recently moved from Windows 10 to Windows 11. I am using Maple 2022.2, and I got that installed and working OK. 

I have four Maple worksheets that I have saved as tasks on Windows 10, but my OS move requires some adjustments. When I try save the modified worksheets to the default Maple help database, I get an error saying that the database is read-only. When I try to make a new database file, Maple asks if it should create it, but then I get an error that Maple can't open the new database.

Suggestions?

Thanks,

Jno.

How do I do the following: 
Im having trouble plotting them on maple 2024 as well

For each function ( f(x) ) given below, define ( F(x) = \integral ,from a to x ,  f(t) \, dt \).

Is \( F(x) \) an antiderivative of \( f(x) \)? Plot \( f(x) \) and \( F(x) \) in the same window for \( x \in [a, b] \). How is \( F(x) \) related to the area between \( f(x) \) and the x-axis on \( [a, b] \)?

(a) ( f(x) = (1/x^2),  a = 1, , b = 10 )

(b) ( f(x) = sin x,  a = 0, , b = pi )

(c) ( f(x) = (1/4) x^4 - 2 x^3+ 4 x^2, , a = 0, , b = 5 )

(d) ( f(x) = (1/4) x^4 - 2 x^3 + 4 x^2, , a = 0, , b = 6 )

.

I reduced the order of two nonlinear equations and solved them numerically in this way. Why are the two results obtained the same?
directdsolve919.mw

I have the function  and derivate with respect to ν and make the change variable ν=1/t it seems it doesn’t work. I put the derivate of 1/t => -1/t2 by hand  (could it be done by “dchange” the hole transformation ?)

I want to approximate the value of the integral. It seems that the solution of the equation and plot in 2 situations for low-frequency ν < 1014  and for high frequency so  when the exponential is dominated.

Thus plot the whole function E2 in the two situations. Could it be done with a series?

For value h := 6.62607015*10^(-34); c := 299792458; T := 273 + 24; k := 1.380649*10^(-23);

ec := 1.602176634*10^(-19); ν1 :=1012 ; ν2 := 1017 ;Tq := 1.765358264*10^(-19);

Could it be merged E2 into one plot for ν = 1012 .. 1017

PPh1.mw

Hi everyone, I wrote a complex 3D curve expression and wanted to calculate its length (0..Pi), but Maple was always calculating and could not get the answer. The code and worksheet are attached.
The idea came from: https://www.mapleprimes.com/questions/239065-Curve-Length-2d-3d

with(plots); with(VectorCalculus)

p1 := spacecurve([t*sin(t/cos(exp(t))), t*cos(t), (2*sqrt(2)*(1/3))*t^(3/2)], t = 0 .. Pi)

 

curve := `<,>`(t*sin(t/cos(exp(t))), t*cos(t), (2*sqrt(2)*(1/3))*t^(3/2))

Vector(3, {(1) = t*sin(t/cos(exp(t))), (2) = t*cos(t), (3) = (2/3)*sqrt(2)*t^(3/2)})

(1)

NULL

x := proc (t) options operator, arrow; t*sin(t/cos(exp(t))) end proc; y := proc (t) options operator, arrow; t*cos(t) end proc; z := proc (t) options operator, arrow; (2/3)*sqrt(2)*t^(3/2) end proc; arcLengthIntegrand := sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2); AL := evalf(Int(arcLengthIntegrand, t = 0 .. Pi)); AL

proc (t) options operator, arrow; VectorCalculus:-`*`(t, sin(VectorCalculus:-`*`(t, cos(exp(t))^VectorCalculus:-`-`(1)))) end proc

 

proc (t) options operator, arrow; VectorCalculus:-`*`(t, cos(t)) end proc

 

proc (t) options operator, arrow; VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, sqrt(2)), 3^VectorCalculus:-`-`(1)), t^VectorCalculus:-`*`(3, 2^VectorCalculus:-`-`(1))) end proc

 

((sin(t/cos(exp(t)))+t*(1/cos(exp(t))+t*exp(t)*sin(exp(t))/cos(exp(t))^2)*cos(t/cos(exp(t))))^2+(cos(t)-t*sin(t))^2+2*t)^(1/2)

 

AL

(2)

NULL

Download length_of_3d_curve.mw

Hi

How we can reduce run time for Cases III and IV ? (Maple 2016)

Thanks alot

Formula_II.mw

Good morning, I am trying to graph the length of the curve but Maple gives me an error. Please if someone can tell me how I can graph the curve in 2d and 3d.

plot([t*sin(t), t*cos(t), (2*sqrt(2))/3*t^(3/2),t, t = 0 .. Pi]) -> error

 

Just one more small geometry task to get to know Maple a little better:
In the 1st quadrant, point A is on the y-axis and points B, D, C are at a positively increasing distance from the origin on the x-axis. Let BD = DC = s/2 and angle ADB = 45°. Point D is therefore the center of BC. The area of ​​triangle ABC is 60, line AD = x and the length of AC = 19. We are looking for the length of line AB = y.

A student wakes up at the end of the lecture and just catches the professor saying:
"... and the roots form an arithmetic sequence."

On the board there is a 5th degree polynomial as homework, but unfortunately the student only manages to write down
x^5 - 5x^4 - 35x^3 +
before the professor wipes the board.

But the student still finds all the roots of the polynomial.

And the roots now have to be calculated.

I have a list

mylist := [[sqrt(-5*x^2 - 5*x - 1) = -4*x - 1, {-1/3, -2/7}], [sqrt(-5*x^2 - 5*x - 1) = x + 1, {-1/2, -2/3}], [sqrt(-5*x^2 - 5*x - 1) = 4*x + 3, {-2/3, -5/7}], [sqrt(-5*x^2 - 5*x + 4) = -5*x + 3, {1/2, 1/3}], [sqrt(-5*x^2 - 4*x + 2) = -5*x + 2, {1/3, 1/5}], [sqrt(-5*x^2 - 4*x + 2) = -2*x + 1, {-1/3, 1/3}]]

I tried
latex(mylist) and get
 

\left[\left[\sqrt{-5 x^{2}-5 x -1} = -4 x -1, \left\{-{\frac{2}{7}}, -
{\frac{1}{3}}\right\}\right], \left[\sqrt{-5 x^{2}-5 x -1} = x +1, 
\left\{-{\frac{2}{3}}, -{\frac{1}{2}}\right\}\right], \left[
\sqrt{-5 x^{2}-5 x -1} = 4 x +3, \left\{-{\frac{5}{7}}, -{\frac{2}{3}}
\right\}\right], \left[\sqrt{-5 x^{2}-5 x +4} = -5 x +3, \left\{{\frac
{1}{2}}, {\frac{1}{3}}\right\}\right], \left[\sqrt{-5 x^{2}-4 x +2} = 
-5 x +2, \left\{{\frac{1}{3}}, {\frac{1}{5}}\right\}\right], \left[
\sqrt{-5 x^{2}-4 x +2} = -2 x +1, \left\{-{\frac{1}{3}}, {\frac{1}{3}}
\right\}\right]\right]

How can I get  a latex like this?

\documentclass[12pt,a4paper]{article}
\usepackage[left=1.5cm, right=1.5cm, top=2cm, bottom=2cm]{geometry}
\usepackage{fouriernc}
\usepackage{enumitem}
\usepackage{amsmath}
\begin{document}
	Solve the following equations:
	\begin{enumerate}[label=\arabic*)]
		\item $\sqrt{-5 x^{2}-5 x -1} = -4 x -1.$ \hfill Answer: $\left\{-{\dfrac{2}{7}}, -{\dfrac{1}{3}}\right\}.$
		\item $\sqrt{-5 x^{2}-5 x -1} = x +1.$ \hfill Answer: $\left\{-{\dfrac{2}{3}}, -{\dfrac{1}{2}}\right\}.$
		\item $\sqrt{-5 x^{2}-5 x -1} = 4 x +3.$ \hfill Answer: $\left\{-{\dfrac{5}{7}}, -{\dfrac{2}{3}}\right\}.$
		\item $\sqrt{-5 x^{2}-5 x +4} = -5 x +3.$ \hfill Answer: $\left\{{\dfrac{1}{2}}, {\dfrac{1}{3}}\right\}.$
		\item $\sqrt{-5 x^{2}-4 x +2} = -5 x +2.$ \hfill Answer: $\left\{{\dfrac{1}{3}}, {\dfrac{1}{5}}\right\}.$
	\end{document}


Loop is not executing all values just considerinng 1st value of tau0 =0.3.

Also how to plot a 2D graph from the loop result

Attaching sheet with questions in the sheet:
for_loop_question_rec.mw

First 68 69 70 71 72 73 74 Last Page 70 of 2426