MaplePrimes Questions

I have the following systems of ODE in hand and would like to solve them. It would be great if somebody could help me with it.

dudx := -415; dudy := 3901; dudz := -3365; dvdx := 23; dvdy := -1270; dvdz := 994; dwdx := 57; dwdy := -1665; dwdz := 1683; taup := 0.5390603100674905e-5

-415

 

3901

 

-3365

 

23

 

-1270

 

994

 

57

 

-1665

 

1683

 

0.5390603100674905e-5

(1)

u := .387; v := -.205; w := -.286; x0 := -0.979849e-2; y0 := -0.14583e-2; z0 := 0.623749e-1

.387

 

-.205

 

-.286

 

-0.979849e-2

 

-0.14583e-2

 

0.623749e-1

(2)

a__1 := dudx/taup; a__2 := dudy/taup; a__3 := dudz/taup; a__4 := 1/taup; a__5 := u/taup; b__1 := dvdx/taup; b__2 := dvdy/taup; b__3 := dvdz/taup; b__4 := 1/taup; b__5 := v/taup; c__1 := dwdx/taup; c__2 := dwdy/taup; c__3 := dwdz/taup; c__4 := 1/taup; c__5 := w/taup

-76985820.00

 

723666708.0

 

-624234420.0

 

185508.0000

 

71791.59600

 

4266684.000

 

-235595160.0

 

184394952.0

 

185508.0000

 

-38029.14000

 

10573956.00

 

-308870820.0

 

312209964.0

 

185508.0000

 

-53055.28800

(3)

sys := diff(x(t), t, t) = a__1*x(t)+a__2*y(t)+a__3*z(t)-a__4*(diff(x(t), t))+a__5, diff(y(t), t, t) = b__1*x(t)+b__2*y(t)+b__3*z(t)-b__4*(diff(y(t), t))+b__5, diff(z(t), t, t) = c__1*x(t)+c__2*y(t)+c__3*z(t)-c__4*(diff(z(t), t))+c__5

diff(diff(x(t), t), t) = -76985820.00*x(t)+723666708.0*y(t)-624234420.0*z(t)-185508.0000*(diff(x(t), t))+71791.59600, diff(diff(y(t), t), t) = 4266684.000*x(t)-235595160.0*y(t)+184394952.0*z(t)-185508.0000*(diff(y(t), t))-38029.14000, diff(diff(z(t), t), t) = 10573956.00*x(t)-308870820.0*y(t)+312209964.0*z(t)-185508.0000*(diff(z(t), t))-53055.28800

(4)

ics := x(0) = x0, y(0) = y0, z(0) = z0, (D(x))(0) = 0, (D(y))(0) = 0, (D(z))(0) = 0

x(0) = -0.979849e-2, y(0) = -0.14583e-2, z(0) = 0.623749e-1, (D(x))(0) = 0, (D(y))(0) = 0, (D(z))(0) = 0

(5)


Thank you very much!

Download m_solution.mw

Hi 

Warm greetings.

Is it possible to solve the numerical scheme present in the below paper.

Anita Chaturvedi, Kokila Ramesh, and Vatsala G A. (2017). “A MATHEMATICAL APPROACH TO STUDY THE EFFECT OF POLLUTANTS/TOXICANTS IN AQUATIC ENVIRONMENT.” International Journal of Research - Granthaalayah, 5(4) RAST, 33-38.

https://doi.org/10.5281/zenodo.803418

Thank you.

Could please help me solving the following problem?
Thank you a lot.

The question https://www.mapleprimes.com/questions/233780-Plot-Absolute-Advantage-Of-Option-A disappeared (I know since I answered today).

Why?

I simplified a vector column using side relations. Then I wanted to evaluate using

eval( equation,  [x1=3,  x2=5......})

But side relations uses the reverse order i.e. after evaluation

[3=x1, 5=x2......]

So then the internals of the list need to be swaped tto work with eval.That is easy. I am just wondering is there a neater way to achieve this?

restart

NULL

P1 := Vector(3, {(1) = -(y[1]-y[3])*(y[2]-y[3])*((x[2]^2-x[2]*x[3]+x[3]^2)*x[1]^2-x[2]*x[3]*(x[2]+x[3])*x[1]+x[2]^2*x[3]^2)*(y[1]-y[2]), (2) = -(x[1]-x[3])*(x[2]-x[3])*(x[1]-x[2])*((y[2]^2-y[2]*y[3]+y[3]^2)*y[1]^2-y[2]*y[3]*(y[2]+y[3])*y[1]+y[2]^2*y[3]^2), (3) = ((-y[1]^2*y[2]+(3*y[2]*y[3]-y[3]^2)*y[1]-y[2]^2*y[3])*x[2]+x[3]*(y[1]^2*y[3]+y[2]*(y[2]-3*y[3])*y[1]+y[2]*y[3]^2))*x[1]^2+((y[1]^2*y[3]+y[2]*(y[2]-3*y[3])*y[1]+y[2]*y[3]^2)*x[2]^2+3*x[3]*(y[2]-y[3])*(y[1]-y[3])*(y[1]-y[2])*x[2]-x[3]^2*(y[1]^2*y[2]+(-3*y[2]*y[3]+y[3]^2)*y[1]+y[2]^2*y[3]))*x[1]-x[3]*((y[1]^2*y[2]+(-3*y[2]*y[3]+y[3]^2)*y[1]+y[2]^2*y[3])*x[2]-x[3]*(y[1]^2*y[3]+y[2]*(y[2]-3*y[3])*y[1]+y[2]*y[3]^2))*x[2]})

eqns := {(x[1]-x[2])*(x[2]-x[3])*(x[3]-x[1]) = R, (y[1]-y[2])*(y[2]-y[3])*(y[3]-y[1]) = S, x[1]^2*x[2]^2-x[1]^2*x[2]*x[3]+x[1]^2*x[3]^2-x[1]*x[2]^2*x[3]-x[1]*x[2]*x[3]^2+x[2]^2*x[3]^2 = Y, y[1]^2*y[2]^2-y[1]^2*y[2]*y[3]+y[1]^2*y[3]^2-y[1]*y[2]^2*y[3]-y[1]*y[2]*y[3]^2+y[2]^2*y[3]^2 = X, x[1]^2*x[2]+x[1]^2*x[3]+x[1]*x[2]^2-6*x[1]*x[2]*x[3]+x[1]*x[3]^2+x[2]^2*x[3]+x[2]*x[3]^2 = Z, y[1]^2*y[2]+y[1]^2*y[3]+y[1]*y[2]^2-6*y[1]*y[2]*y[3]+y[1]*y[3]^2+y[2]^2*y[3]+y[2]*y[3]^2 = W}

P1new := simplify(P1, eqns)

Vector[column](%id = 36893490132854572084)

(1)

values := {x[1] = 3, x[2] = 5, x[3] = 7, y[1] = 2, y[2] = -11, y[3] = 13}

{x[1] = 3, x[2] = 5, x[3] = 7, y[1] = 2, y[2] = -11, y[3] = 13}

(2)

vals1 := eval(eqns, values)

{-3432 = S, 16 = R, 120 = Z, 316 = Y, 2018 = W, 22753 = X}

(3)

eval(P1new, vals1)

Vector[column](%id = 36893490132854572084)

(4)

vals1swap := [seq(rhs(vals1[i]) = lhs(vals1[i]), i = 1 .. nops(vals1))]

[S = -3432, R = 16, Z = 120, Y = 316, W = 2018, X = 22753]

(5)

eval(P1new, vals1swap)

Vector[column](%id = 36893490132849052116)

(6)

eval(P1, values)

Vector[column](%id = 36893490132871267020)

(7)

``

NULL

``

Download Q_6-03-2022_side_rels_and_eval.mw

Need help to plot a graph along x-axis  in attached worksheet. 

help_graph.mw

NULL

restart;

with(plots):with(plottools):

Solve diagonal resistance of nodes (0,0,0)-(3,4,5), (Edge length = ohm).(156/47 ohm)

   

plots[display]([nodes, node2, plotlinesx], scaling = constrained, style = wireframe, axes = boxed, orientation = [-50, 70, 0])

 

Solve minimum diagonal surface distance of nodes (0,0,0)-(3,4,5).(sqrt(74))
NULL

NULL

Download Resistance-345.mw

Solve diagonal resistance of nodes (0,0,0)-(3,4,5),

Edge length = ohm, therefore, each edge has 3, 4 and 5 ohm, respectivery. (156/47 ohm)

Solve minimum diagonal surface distance of nodes (0,0,0)-(3,4,5). (sqrt(74))

Electric circuit study.

Tokoro.

A have som problems when i Will save a project. It Will take 2-5 Minutes where my other freinds never Experince this? Also i have some problems when i pauses writing, when i take notes in class, it Will give me the loading circle on mac( iam using a MacBook Air 2018) 

i hope you Can help:)

thx

Hi, im trying to optimize a function with a constraint. 

I've tried the Optimize package but I can't seem to make it work. 

I've attached  an image to my question, witht the function and the constraint. I want to find the optimal "t_x"

Function: rho*ln((-beta*tau + rho)/(1 + t__x)) + sigma*ln(sigma/(1 + t__y)) + beta*tau + B - rho - sigma - beta*tau*ln((-beta*tau + rho)/(1 + t__x))

Constaint: -t__x*(-beta*tau + rho)/(1 + t__x) + t__y*sigma/(1 + t__y) = R

Hope you can help 

Dear Colleagues,

I am trying to solve the following system of ode

odeSystem := {diff(y1(x), x) = -x*y2(x)-(1+x)*y3(x), diff(y2(x), x) = -x*y1(x)-(1+x)*y4(x), diff(y3(x), x) = -x*y1(x)-(1+x)*y4(x)-5*x*cos((1/2)*x^2), diff(y4(x), x) = -x*y2(x)-(1+x)*y3(x)+5*x*sin((1/2)*x^2), y1(0) = 5, y2(0) = 1, y3(0) = -1, y4(0) = 0};
systemSol := dsolve(odeSystem);

However, the result displayed is not explicit and contains integral sign. Please, I need help to obtain explicit result.

Thank you.

Please see the attached file; I'm attempting to do some calculations with the 'PDETools' package; notice the first term in equation (4), where sqrt(x2+y2) is not canceling in the fraction, despite using the 'simplify' command; why is this happening, and how can I achieve complete simplification?

Ques_Mapleprime.mw

with(PDEtools):

DepVars := [u(x, y, t), U(xi, eta)]; 1; alias(u = u(x, y, t))

[u(x, y, t), U(xi, eta)]

 

u

(1)

xi[1] := 1/2*(x^2+y^2); 1; xi[2] := t; 1; u := (h(t)+(x^2+y^2)*(1/2))*arccos(x/sqrt(x^2+y^2))/t+U(xi[1], xi[2])

(1/2)*x^2+(1/2)*y^2

 

t

 

(h(t)+(1/2)*x^2+(1/2)*y^2)*arccos(x/(x^2+y^2)^(1/2))/t+U((1/2)*x^2+(1/2)*y^2, t)

(2)

(diff(u, x))*(diff(u, y))

(x*arccos(x/(x^2+y^2)^(1/2))/t-(h(t)+(1/2)*x^2+(1/2)*y^2)*(1/(x^2+y^2)^(1/2)-x^2/(x^2+y^2)^(3/2))/((1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*x)*(y*arccos(x/(x^2+y^2)^(1/2))/t+(h(t)+(1/2)*x^2+(1/2)*y^2)*x*y/((x^2+y^2)^(3/2)*(1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*y)

(3)

collect(simplify(subs(1/2*(x^2+y^2) = xi, t = eta, (x*arccos(x/(x^2+y^2)^(1/2))/t-(h(t)+(1/2)*x^2+(1/2)*y^2)*(1/(x^2+y^2)^(1/2)-x^2/(x^2+y^2)^(3/2))/((1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*x)*(y*arccos(x/(x^2+y^2)^(1/2))/t+(h(t)+(1/2)*x^2+(1/2)*y^2)*x*y/((x^2+y^2)^(3/2)*(1-x^2/(x^2+y^2))^(1/2)*t)+(D[1](U))((1/2)*x^2+(1/2)*y^2, t)*y))), D, 'distributed')

(1/4)*(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x^2+y^2)^(1/2)*(y^2/(x^2+y^2))^(1/2)*y^2+x^3+x*y^2+2*h(eta)*x)/(y*(x^2+y^2)^2*eta^2)

(4)

``

Download Ques_Mapleprime.mw

Hi, is it possible to convert mathematica files into maple. i was trying to upload mathematica file here but got failed, so uploading mathematica file into pdf. could anyone can help me to convert these file into maple.

Conversion.pdf

Could you help me to convert the following maple solution expressed by the hypergeom function to the LegendreP and Q function?

diff(T[3](t), t, t)+3*(diff(a(t), t))*(diff(T[3](t), t))/a(t)+(2*(diff(a(t), t, t))/a(t)+6*(diff(a(t), t))^2/a(t)^2+(-Omega^2+6)/a(t)^2)*T[3](t)

diff(diff(T[3](t), t), t)+3*(diff(a(t), t))*(diff(T[3](t), t))/a(t)+(2*(diff(diff(a(t), t), t))/a(t)+6*(diff(a(t), t))^2/a(t)^2+(-Omega^2+6)/a(t)^2)*T[3](t)

(1)

"a(t) :=Zeta*(1-(1-t/(Zeta^()))^(2))^(1/(2)) "

proc (t) options operator, arrow, function_assign; Zeta*(1-(1-t/Zeta)^2)^(1/2) end proc

(2)

ODE2 := diff(T[3](t), t, t)+3*(diff(a(t), t))*(diff(T[3](t), t))/a(t)+(2*(diff(a(t), t, t))/a(t)+6*(diff(a(t), t))^2/a(t)^2+(-Omega^2+6)/a(t)^2)*T[3](t)

diff(diff(T[3](t), t), t)+3*(1-t/Zeta)*(diff(T[3](t), t))/((1-(1-t/Zeta)^2)*Zeta)+(2*(-(1-t/Zeta)^2/((1-(1-t/Zeta)^2)^(3/2)*Zeta)-1/((1-(1-t/Zeta)^2)^(1/2)*Zeta))/(Zeta*(1-(1-t/Zeta)^2)^(1/2))+6*(1-t/Zeta)^2/((1-(1-t/Zeta)^2)^2*Zeta^2)+(-Omega^2+6)/(Zeta^2*(1-(1-t/Zeta)^2)))*T[3](t)

(3)

generalsol := dsolve(ODE2, T[3](t))

T[3](t) = _C1*hypergeom([1/2+(-Omega^2+1)^(1/2), 1/2-(-Omega^2+1)^(1/2)], [1-((1/2)*I)*15^(1/2)], (1/2)*t/Zeta)*t^(-((1/4)*I)*15^(1/2)-1/4)*(2*Zeta-t)^(((1/4)*I)*15^(1/2)-1/4)+_C2*(-(-2*Zeta+t)*t)^(((1/4)*I)*15^(1/2)-1/4)*hypergeom([((1/2)*I)*15^(1/2)+1/2+(-Omega^2+1)^(1/2), ((1/2)*I)*15^(1/2)+1/2-(-Omega^2+1)^(1/2)], [1+((1/2)*I)*15^(1/2)], (1/2)*t/Zeta)

(4)

convert(_C1*hypergeom([1/2+sqrt(-Omega^2+1), 1/2-sqrt(-Omega^2+1)], [1-I*sqrt(15)*(1/2)], t/(2*Zeta))*t^(-I*sqrt(15)*(1/4)-1/4)*(2*Zeta-t)^(I*sqrt(15)*(1/4)-1/4), LegendreP)

_C1*GAMMA(1-((1/2)*I)*15^(1/2))*(-t/Zeta)^(((1/4)*I)*15^(1/2))*LegendreP(-1/2+(-Omega^2+1)^(1/2), ((1/2)*I)*15^(1/2), 1-t/Zeta)*t^(-((1/4)*I)*15^(1/2)-1/4)*(2*Zeta-t)^(((1/4)*I)*15^(1/2)-1/4)/((2*Zeta-t)/Zeta)^(((1/4)*I)*15^(1/2))

(5)

convert(_C2*(-t*(t-2*Zeta))^(I*sqrt(15)*(1/4)-1/4)*hypergeom([I*sqrt(15)*(1/2)+1/2+sqrt(-Omega^2+1), I*sqrt(15)*(1/2)+1/2-sqrt(-Omega^2+1)], [1+I*sqrt(15)*(1/2)], t/(2*Zeta)), LegendreQ)

_C2*(-t*(-2*Zeta+t))^(((1/4)*I)*15^(1/2)-1/4)*hypergeom([((1/2)*I)*15^(1/2)+1/2+(-Omega^2+1)^(1/2), ((1/2)*I)*15^(1/2)+1/2-(-Omega^2+1)^(1/2)], [1+((1/2)*I)*15^(1/2)], (1/2)*t/Zeta)

(6)

NULL

Download solve3.mw

Like this

Thank you.

I was wondering if it is possible to write Maple code in 2D notation inside .mpl and have it converted automatically to standard Maple 1D math.

For example, suppose I have A.mpl file with the content


#--- this is inside A.mpl file

ode:=y''(x)+y'(x)=sin(x);
ic:=y(0)=1,y'(0)=0;
dsolve([ode,ic],y(x));

Right now, reading this file in worksheet or even in document mode gives error:

        read "A.mpl"

Error, on line 1, syntax error, unexpected single forward quote:
ode:=y''(x)+y'(x)=sin(x);

But in document mode, one can type this in, and Maple will accept it. 

Since I do not use document mode and most of my code is in mpl files, I was wondering if one can write y'(x) instead of diff(y(x),x) and have maple automatically convert the code as it reads it somehow?

I find it much easier and more natural to write   y''(0)=1  than (D@@2)(y)(0)=1  for example.

I do understand the technical problems parsing this as has special meaning in Maple. But Maple does handle this input OK if typed in by hand in document 2D mode. It just needs to extend this to reading it from mpl files.

May be a future release of Maple will support this (using some switches or option when reading the file?)

Hi all!

I was wondering if it was possible to execute different subsections in my sheet based on if statements? I'm calculating two different processes and by being able to switch between the two with if statemens it would save me a lot of variables. Lets say i have three subsections in my sheet:

  • Variables
  • Process 1 calculation
  • Process 2 calculation

So by using an if statement i can choose which calculation that should be used, and therefore i can use the same variables. Or at least that's what i hope :) 

Thanks!

First 331 332 333 334 335 336 337 Last Page 333 of 2426