Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

Hello

I solved these equations numerically but I need to solve it by Runge-Kutta fourth order Method. Kindly help me in the coding of the same.

 


restart;
N1 :=1:N2 :=1: N3 :=0.1 :R := -1:
EQ:={(1+N1)*diff(f(x),x$4)-N1*diff(g(x),x$2)-R*(-diff(f(x),x)*diff(f(x),x$2)+f(x)*diff(f(x),x$3))=0, N2*diff(g(x),x$2)+N1*(diff(f(x),x$2)-2*g(x))-N3*R*(f(x)*diff(g(x),x)-diff(f(x),x)*g(x))=0}:


IC:={D(D(f))(0)=0, D(f)(1)=0,f(0)=0,f(1)=1,g(0)=0,  g(1)=0}:

sol:= dsolve(EQ union IC, numeric,output=Array([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1])):
 

I want to show the animation of the polar equation r=cos(2theta) be plotted from theta=0 to 2pi

I have a simple matrix, 11 rows x 3 columns, with header row.  <<

I multiply column 1 and 2 to get <<0.,0.031,0.218,0.657,1.084,1.095,0.654,0.217>>

Now, I just want to add up these elements, but 'sum' doesn't work 'Sum' doesn't work either. Is there a simpel way to do this?
 

m1 := `<|>`(`<,>`("# girls", 0, 1, 2, 3, 4, 5, 6, 7, 8), `<,>`("P(x)", 0.4e-2, 0.31e-1, .109, .219, .271, .219, .109, 0.31e-1, 0.4e-2), `<,>`("x*P(x)", 0, 0, 0, 0, 0, 0, 0, 0, 0))

Matrix(%id = 18446745635438952446)

(1)

m1[2 .. 9, 3] := `~`[`*`](m1[2 .. 9, 1], m1[2 .. 9, 2])

Vector[column](%id = 18446745635417541318)

(2)

"Sum?"

Vector[column](%id = 18446745635493441398)

(3)

"sum?"

Error, (in LinearAlgebra:-Multiply) invalid arguments

 

``


 

Download Untitled_(3).mw

I want to shade the area where the two polar curves overlap. The first curve is r=2 and the other curve is r=2(1-cos(theta)). How do I do this?

I want to find the surface area of this parametric curve revolving around the x-axis. I was able to plot the 2D rendering but I want to show the plot so that I can see the surface area. I suspect that would be the 3D rendering.

x=cos(t), y=2+sin(t), 0<=t<=2pi, x-axis

Hi,

It seems that plottools:-extrude doesn't support the "style" option: no error returned, just the extusion being always of surface style.
Am I correct ?

The solver seems to have a problem with some sets of boundary conditions. (See attached worksheet.)

Is there a way to get this numerical solution?
 

BC_test.mw

[differentiation of f and greek letter xi in bracket]

Hi,

I am trying to find q(t) from this 

ode1:=-diff(q(t), t) - 1.851851852*10^(-7)*q(t)*(2.042885233*10^10 - 3.517396152*10^18*(0.00001474262739*cos((1000*sqrt(1122)*t)/33) + 0.00001474262739*sin((1000*sqrt(1122)*t)/33))^2) + 9.259259260*10^(-7);

with initial condition

ics := q(0) = 2.45*10^(-12)

using

dsolve({ode1,ics})

but I cannot get the full solution. Is there any way I could find q(t)?

Thanks,

Baharm31

This is the source:

ode1.mw

 

 

 

Hello 

I am having equation y(x) in 5 variable c1, c2, A, R and x.

I am not able to plot graph in x and y(x) for A=1, c1 = 2.3, c2 = 2.4 and R=0,2 5,9.

Range of x: -1..1

Caption :graph of y(x) at different value of R.

Legend: R=0, R=1, R=2, R=3.

my equation is


 

"y(x):=0.0000148809523809523809 A^3 R^2 x^10-0.000334821428571428572 A^3 R^2 x^8+0.00156250000000000000 A^3 R^2 x^7+0.000133928571428571429 A^3 R^2 x^6-0.00312500000000000000 A^2 R^2 x^7+0.00156250000000000000 A^3 R^2 x^5-0.0156250000000000000 A^3 R^2 x^4-0.00312500000000000000 A^2 R^2 x^5-0.00625000000000000000 A^2 R x^6+0.00647321428571428572 A^3 R^2 x^3+0.0625000000000000000 A^2 R^2 x^4-0.0129464285714285714 A^2 R^2 x^3-0.0625000000000000000 A R^2 x^4+0.0625000000000000000 A c1 c2 x^4+0.125000000000000000 A^2 R x^3-0.00319293058132343847 A^3 R^2+0.00803571428571428571 A^2 R x^2-0.250000000000000000 A R x^3+0.0125000000000000000 A^2 R^2-0.00178571428571428571 A^2 R-0.0125000000000000000 A R^2+0.0125000000000000000 A c1 c2-0.750000000000000000 A x^2+0.500000000000000001 (0.0380078849721706865 A^3 R^2-0.150000000000000000 A^2 R^2+0.150000000000000000 A R^2-0.150000000000000000 A c1 c2) x^2+0.750000000000000000 A+1.00000000000000000 (-0.00959821428571428571 A^3 R^2+0.0191964285714285714 A^2 R^2) x+1.00000000000000000 (-0.125000000000000000 A^2 R+0.250000000000000000 A R) x:"

``


 

Download Ques1.mw


 

NULL

Restart:

pde := diff(w(x, t), x $ 4) + diff(w(x, t), t $ 2)/c^2 = 0;

diff(diff(diff(diff(w(x, t), x), x), x), x)+(diff(diff(w(x, t), t), t))/c^2 = 0

(1)

test1 := w(x, t) = W(x)*cos(omega*t); pde1 := expand((eval(pde, test1))/cos(omega*t))

w(x, t) = W(x)*cos(omega*t)

 

diff(diff(diff(diff(W(x), x), x), x), x)-W(x)*omega^2/c^2 = 0

(2)

ode := algsubs(omega^2/c^2 = alpha^4, pde1); sol := dsolve(ode); sol := convert(sol, trig)

-W(x)*alpha^4+diff(diff(diff(diff(W(x), x), x), x), x) = 0

 

W(x) = _C1*exp(-alpha*x)+_C2*exp(alpha*x)+_C3*sin(alpha*x)+_C4*cos(alpha*x)

 

W(x) = _C1*(cosh(alpha*x)-sinh(alpha*x))+_C2*(cosh(alpha*x)+sinh(alpha*x))+_C3*sin(alpha*x)+_C4*cos(alpha*x)

(3)

L_collection := [indets(sol, specfunc({cos, cosh, sin, sinh}))[]]

[cos(alpha*x), cosh(alpha*x), sin(alpha*x), sinh(alpha*x)]

(4)

``

temp := collect(sol, [sinh, cosh, sin, cos])

W(x) = (-_C1+_C2)*sinh(alpha*x)+(_C1+_C2)*cosh(alpha*x)+_C3*sin(alpha*x)+_C4*cos(alpha*x)

(5)

CL := [coeffs(rhs(temp), L_collection)]NULL

[-_C1+_C2, _C1+_C2, _C3, _C4]

(6)

R:=[seq(cat(_D,i)=CL[i], i=1..nops(CL))]

[_D1 = -_C1+_C2, _D2 = _C1+_C2, _D3 = _C3, _D4 = _C4]

(7)

MX:= subs((rhs=lhs)~(R), temp);

W(x) = _D1*sinh(alpha*x)+_D2*cosh(alpha*x)+_D3*sin(alpha*x)+_D4*cos(alpha*x)

(8)

boundary_condition_1 := simplify(rhs(eval(diff(MX, `$`(x, 1)), x = 0))/alpha = 0)

_D1+_D3 = 0

(9)

boundary_condition_2 := simplify(rhs(eval(MX, x = 0)) = 0)

_D2+_D4 = 0

(10)

boundary_condition_3 := simplify(rhs(eval(diff(MX, `$`(x, 1)), x = L))/alpha = 0)

cosh(alpha*L)*_D1+sinh(alpha*L)*_D2+cos(alpha*L)*_D3-sin(alpha*L)*_D4 = 0

(11)

boundary_condition_4 := simplify(rhs(eval(MX, x = L)) = 0)

_D1*sinh(alpha*L)+_D2*cosh(alpha*L)+_D3*sin(alpha*L)+_D4*cos(alpha*L) = 0

(12)

boundary_condition_solve := solve([boundary_condition_1, boundary_condition_2, boundary_condition_3, boundary_condition_4]); MX := eval(MX, boundary_condition_solve)

Warning, solutions may have been lost

 

{L = L, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = 0}, {L = 0, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = alpha}, {L = L, _D1 = 0, _D2 = 0, _D3 = 0, _D4 = 0, alpha = alpha}

 

Error, invalid input: eval received ({L = L, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = 0}, {L = 0, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = alpha}, {L = L, _D1 = 0, _D2 = 0, _D3 = 0, _D4 = 0, alpha = alpha}), which is not valid for its 2nd argument, eqns

 

``


 

Download Free_Vibration_Euler_Bernouli_Beam_1.mw

I have tried to solve these 4 equations to get the characteristic equation and finally the solution of the PDE.  But it shows some error. Can you please help with this issue?

I am trying to use this command

plot({0, 2*x^2, 2*x^2 - 2*x^3 + 8/3*x^4 - 4*x^5}, x = -10 .. 10, color = ["DarkGreen", "CornflowerBlue", "Burgundy"])

However, only the last function is showing up. 0 and 2x^2 is not showing up. I can't change the axes sizes because then the last function disappears.

I have the following question, plot the graph of mu=5*log_10(D_L/10) where D_L=(c/H_0)*\int_0^z dz'/[A(1+z')^4+B(1+z)^3+C]^{1/2} with resepct to z, where A,B,C are numerical values given beforehand, and c is the speed of light and H_0 is the current Hubble constant.

 

Can someone please help with this simple plotting assignment.

 

Thanks, just by experience, can I learnt these syntax languages.

 

Peace out!

 

restart;
PDEtools[declare](f(x), prime = x);
N := 4;
f(x) :=  sum(p^i*f[i](x), i = 0..N):
HPMEq := (1 - p)*diff(f(x), x $ 3) + p*(diff(f(x), x $ 3) + 1/2*diff(f(x), x, x)*f(x));
for i from 0 to N do
    equ[1][i] := coeff(HPMEq, p, i) = 0;
end do;
cond[1][0] := f[0](0) = 0, D(f[0])(0) = 0, D(f[0])(5) = 1

for j to N do
    cond[1][j] := f[j](0) = 0, D(f[j])(0) = 0, D(f[j])(5) = 0;
end do

for i from 0 to N do
    dsolve({cond[1][i], equ[1][i]}, f[i](x));
    f[i](x) := rhs(%);
end do;
f(x) := evalf(simplify(sum(f[n](x), n = 0 .. N)))

convert(f(x), 'rational')

subs(x = 2.4, diff(f(x), x))

Prime_Derivative_Notation_for_Explicit_X_Values.mwPrime_Derivative_Notation_for_Explicit_X_Values.mw

## I hope this works. I can't seem to paste my MW file in this window in a readable format.

First 15 16 17 18 19 20 21 Last Page 17 of 46