Kitonum

21500 Reputation

26 Badges

17 years, 60 days

MaplePrimes Activity


These are answers submitted by Kitonum

You did not present your example in an editable form, so I am showing the solution with a simple example (terms with derivatives are left on the left side of the equation, the rest are moved to the right):

restart;
Eq:=2*x(t)+1/3*diff(x(t),t)-5=0;
Terms:=[op(lhs(Eq))];
(select,remove)(has,Terms,diff);
add(%[1])=-add(%[2]);


Of course, for use, this code should be written as a procedure, and then you can apply it to each of your differential equations.

restart;
Student:-Precalculus:-CompleteSquare(x^2 + y^2 - 10*x - 75 = 0, [x,y]);
% + 100;

                                    (x-5)^2+y^2-100 = 0
                                     (x-5)^2+y^2 = 100

Unfortunately, the  simplify  command does not always cope with the task. If you want to check the equivalence with one command, then you can use the  is  command:

 

restart;

expr1:=(-exp(n*Pi*(2*b - y)/a) + exp(n*Pi*y/a))/((exp(2*n*Pi*b/a) - 1)):
expr2:= sinh(n*Pi/a*y)/tanh(n*Pi/a*b)-cosh(n*Pi/a*y):
is(expr1-expr2=0);

true

(1)

 


 

Download q_new.mw

I wrote down all the code in 1d math (I hate 2d math input) and added the plotting of  x(t)  and  y(t) :

 

restart;

Phi:=<x(t), y(t)>;
Sys:=Equate(diff(Phi,t), <6,1; 4,3>.Phi+<6*t, -10*t+4>);
Sol:=dsolve(Sys);
plot(eval([x(t),y(t)], eval(Sol,[_C1=1,_C2=1])), t=0..0.5, color=[red,blue]);

Vector(2, {(1) = x(t), (2) = y(t)})

 

[diff(x(t), t) = 6*x(t)+y(t)+6*t, diff(y(t), t) = 4*x(t)+3*y(t)-10*t+4]

 

{x(t) = exp(7*t)*_C2+exp(2*t)*_C1-2*t-4/7, y(t) = exp(7*t)*_C2-4*exp(2*t)*_C1+10/7+6*t}

 

 


 

Download Solving_ODE_new.mw

Side surface and bases of a cylinder can be specified parametrically using 2 parameters (as any 2D surface).

Side:=plot3d([cos(t),sin(t),z], t=0..2*Pi, z=0..2, style=surface, color=green):
Base1:=plot3d([R*cos(t),R*sin(t),0], t=0..2*Pi, R=0..1, style=surface, color=green):
Base2:=plot3d([R*cos(t),R*sin(t),2], t=0..2*Pi, R=0..1, style=surface, color=green):
plots:-display(Side,Base1,Base2);

 

tax := 0.3*profit:
profit := 0.1*totalsalesx:
solve(totalsalesx = 60.1 + tax + profit);

                          69.08045977


If you need an absolutely accurate (symbolic solution) then use fractions:

tax := 3/10*profit: 
profit := 1/10*totalsalesx: 
solve(totalsalesx = 60+1/10 + tax + profit); 
floor(%) %+ frac(%); # Isolation of the whole part

                                    6010/87
                                   69 + 7/87  


 

restart;
lambda := 2*(1/10);                              
mu := -1;
beta := 10;                              
alpha := -25;                              
C := 1;                               
k := (1/12)*sqrt(6)/sqrt(beta*lambda*mu);                      
w := alpha/((10*sqrt(-lambda*mu))*beta);                           
A[0] := (1/2)*alpha/((10*sqrt(-lambda*mu))*((1/12)*beta*sqrt(6)/sqrt(beta*lambda*mu)));
A[1] := -(1/10)*alpha/((1/12)*beta*mu*sqrt(6)/sqrt(beta*lambda*mu));      
A[2] := -(12*((1/12)*sqrt(6)/sqrt(beta*lambda*mu)))*lambda^2*alpha/(10*sqrt(-lambda*mu));                    
H := ln(sqrt(lambda/(-mu))*tanh(sqrt(-lambda*mu)*(xi+C)));               
xi := k*x-t*w;
                   
u[0] := A[0]+A[1]*exp(-H)+A[2]*exp(-H)*exp(-H);
plot3d(Im(u[0]), x = -10 .. 10, t = -10 .. 10, view=-50..50);

1/5

 

-1

 

10

 

-25

 

1

 

-((1/24)*I)*6^(1/2)*2^(1/2)

 

-(1/4)*5^(1/2)

 

-((1/4)*I)*5^(1/2)*6^(1/2)*2^(1/2)

 

-((1/2)*I)*6^(1/2)*2^(1/2)

 

-((1/20)*I)*6^(1/2)*2^(1/2)*5^(1/2)

 

ln((1/5)*5^(1/2)*tanh((1/5)*5^(1/2)*(xi+1)))

 

-((1/24)*I)*6^(1/2)*2^(1/2)*x+(1/4)*t*5^(1/2)

 

-((1/4)*I)*5^(1/2)*6^(1/2)*2^(1/2)-((1/2)*I)*6^(1/2)*2^(1/2)*5^(1/2)/tanh((1/5)*5^(1/2)*(-((1/24)*I)*6^(1/2)*2^(1/2)*x+(1/4)*t*5^(1/2)+1))-((1/4)*I)*6^(1/2)*2^(1/2)*5^(1/2)/tanh((1/5)*5^(1/2)*(-((1/24)*I)*6^(1/2)*2^(1/2)*x+(1/4)*t*5^(1/2)+1))^2

 

 

A:=plots:-contourplot3d(Im(u[0]), x = -10 .. 10, t = -10 .. 10, color=red, thickness=3, contours=[seq(C,C=-40..40,10)], coloring=[white,blue], view=-50..50, filledregions=true, grid=[100,100]):

B:=plots:-contourplot(Im(u[0]), x = -10 .. 10, t = -10 .. 10, color=red, contours=[seq(C,C=-40..40,10)], grid=[100,100]):

f:=plottools:-transform((x,y)->[x,y,-50]):
plots:-display(A,f(B));

 

 


 

Download contours2d_3d.mw


 

restart;

ContoursWithLabels := proc (Expr, Range1::(range(realcons)), Range2::(range(realcons)), Number::posint := 8, S::(set(realcons)) := {}, GraphicOptions::list := [color = black, axes = box], Coloring::`=` := NULL)

local r1, r2, L, f, L1, h, S1, P, P1, r, M, C, T, p, p1, m, n, A, B, E;

uses plots, plottools;

f := unapply(Expr, x, y);

if S = {} then r1 := rand(convert(Range1, float)); r2 := rand(convert(Range2, float));

L := [seq([r1(), r2()], i = 1 .. 205)];

L1 := convert(sort(select(a->type(a, realcons), [seq(f(op(t)), t = L)]), (a, b) ->is(abs(a) < abs(b))), set);

h := (L1[-6]-L1[1])/Number;

S1 := [seq(L1[1]+(1/2)*h+h*(n-1), n = 1 .. Number)] else

S1 := convert(S, list)  fi;

print(Contours = evalf[2](S1));

r := k->rand(20 .. k-20); M := []; T := [];

for C in S1 do

P := implicitplot(Expr = C, x = Range1, y = Range2, op(GraphicOptions), gridrefine = 3);

P1 := [getdata(P)];

for p in P1 do

p1 := convert(p[3], listlist); n := nops(p1);

if n < 500 then m := `if`(40 < n, (r(n))(), round((1/2)*n)); M := `if`(40 < n, [op(M), p1[1 .. m-11], p1[m+11 .. n]], [op(M), p1]); T := [op(T), [op(p1[m]), evalf[2](C)]] else

if 500 <= n then h := floor((1/2)*n); m := (r(h))(); M := [op(M), p1[1 .. m-11], p1[m+11 .. m+h-11], p1[m+h+11 .. n]]; T := [op(T), [op(p1[m]), evalf[2](C)], [op(p1[m+h]), evalf[2](C)]]

fi; fi; od; od;

A := plot(M, op(GraphicOptions));

B := plots:-textplot(T);

if Coloring = NULL then E := NULL else E := ([plots:-densityplot])(Expr, x = Range1, y = Range2, op(rhs(Coloring)))  fi;

display(E, A, B);

end proc:

z := -y + sech(x - 3*t);

w := 10*sech(x - 3*t);

with(plots):

P1 := plot(eval(w, t = 0), x = -10 .. 10):
P2 := contourplot(eval(z, t = 0), x = -10 .. 10, y = -eval(w, t = 0) .. eval(w, t = 0), contours = 5, grid = [101, 101]):
display(P1, P2);

Q2:=ContoursWithLabels( eval(z, t = 0), -10 .. 10, -10..10, {-7,-3,1,5,9}, [color=blue,axes=box]):
display(P1,Q2);

-y+sech(-x+3*t)

 

10*sech(-x+3*t)

 

 

Contours = [-7., -3., 1., 5., 9.]

 

 

 


 

Download Contours.mw

I do not understand why you got solutions in terms of Bessel functions. The direct solution below is expressed through the function  erfi :

E:=1/2:
Eq := -(1/2)*(diff(psi(x), x, x))+(1/2)*x^2*psi(x) = E*psi(x); 
Sol := dsolve(Eq);
plot(eval(rhs(Sol),[_C1=2,_C2=1]), x=0..2);

 

There are different versions of this concept. See the wiki for this. For example, for functions defined on the positive half-axis (for the negative half-axis they are considered equal to 0), the problem reduces to calculating the integral over a finite interval, i.e. in Maple we can use the  int   function.

Example:

restart;
f:=t->sin(t):
g:=t->cos(t):
int(f(t)*g(x-t), t=0..x);
plot(%, x=0..10);


 

 

You did not specify what values the function  f  takes outside the segment  [0,1] . (Maple ignores your original assumption  assume(0 <= x, x <= 1)). By default, in this case outside the segment  [0,1]  the function  f  is considered equal to 0. If you specify in the definition of the function that it is undefined outside the segment  [0,1] , then everything is OK (see the function  g  below):
 

NULL

restart

assume(0 <= x, x <= 1); ode := diff(y(x), x) = 0

diff(y(x), x) = 0

(1)

dsolve(ode)

y(x) = _C1

(2)

f := proc (x) options operator, arrow; piecewise(0 <= x and x < 1/2, 1, x <= 1 and 1/2 <= x, 0) end proc

proc (x) options operator, arrow; piecewise(0 <= x and x < 1/2, 1, x <= 1 and 1/2 <= x, 0) end proc

(3)

f(-1); f(2); plot(f, -1 .. 2, color = red, axes = box, discont)

0

 

0

 

 

diff(f(x), x)

piecewise(x = 0, undefined, x = 1/2, undefined, 0)

(4)

g := proc (x) options operator, arrow; piecewise(0 <= x and x < 1/2, 1, 1/2 <= x and x <= 1, 0, undefined) end proc; diff(g(x), x); g(-1); g(2); plot(g, -1 .. 2, color = red, axes = box, discont)

g := proc (x) options operator, arrow; piecewise(0 <= x and x < 1/2, 1, 1/2 <= x and x <= 1, 0, undefined) end proc

 

piecewise(x = 1/2, undefined, 0)

 

undefined

 

undefined

 

 

NULL



You also wrote: "Whats is the relationship between this example and Existence and uniqueness theorem for fist order ode". I do not see any relationship here.

Download diff_piecewise_new.mw

If I understand the question correctly, then here is the solution (x(t)  is a vector-function  x(t)=<x1(t),x2(t)>):

restart;
A:=<1,2; 3,4>;
ODE:=Equate(diff(<x1(t),x2(t)>, t),A.<x1(t),x2(t)>);
dsolve({ODE[],x1(0)=0,x2(0)=1});

               

Here is a visalization of Joachimsthal's theorem using the ellipse  x^2/5^2+y^2/3^2=1  as an example. I took the point  P0=[1,1]  inside the ellipse and found 4 normals to the ellipse passing through this point (P0A, P0B, P0C, P0E  in the pic.). The point  E1  is diametrically opposite the point  E . I found the equation of the circle passing through points  A, B, C. We see in the pic. that this circle also passes through the point E1.

  
 

restart;
Ellipse:=plots:-implicitplot(x^2/5^2+y^2/3^2=1, x=-6..6,y=-6..6, color=blue):
P0:=[1,1]:
Sys:={x^2/5^2+y^2/3^2=1, (x-P0[1])*(y/3^2)-(x/5^2)*(y-P0[2])};
Sol:=[solve(Sys,explicit)]:
L:=map(t->eval([x,y],t),simplify(fnormal~(evalf(Sol),9), zero));
Points:=plots:-pointplot([L[],-L[2],P0], symbol=solidcircle, color=[red$5,green], symbolsize=15):
a:=L[1]: b:=L[3]: c:=L[4]: e:=L[2]: e1:=-e:
P0A:=plot([P0,a], color=green):
P0B:=plot([P0,b], color=green):
P0C:=plot([P0,c], color=green):
P0E:=plot([P0,e], color=green):
geometry:-circle(cc,[geometry:-point(A,a),geometry:-point(B,b),geometry:-point(C,c)]):
Eq:=geometry:-Equation(cc, [x,y]);
Circle:=plots:-implicitplot(Eq, x=-2..7, y=-4..4, color=red):
T:=plots:-textplot([[P0[],"P0"],[a[],A],[b[],B],[c[],C],[e[],E],[e1[],E1]],font=[times,18], align={below,right}):

plots:-display(Ellipse,Points, Circle, P0A, P0B, P0C, P0E, T, view=[-5.7..5.7,-3.7..3.7], scaling=constrained, size=[800,500]);

{(1/9)*(x-1)*y-(1/25)*x*(y-1), (1/25)*x^2+(1/9)*y^2 = 1}

 

[[1.30833205, 2.89547512], [-4.94896878, -.427521813], [4.80303934, -.833722213], [1.96259737, -2.75923109]]

 

-3.948442606+x^2+y^2-4.167340016*x-.2399612430*y = 0

 

 

 
 

 


Download Joachimsthal.mw

When solving numerically, all parameters must be specified.


 

restart

ode1 := diff(f(eta), `$`(eta, 3))+(diff(f(eta), `$`(eta, 2)))*f(eta)-(diff(f(eta), eta))^2-M*(diff(f(eta), eta))-A*(diff(f(eta), eta)+(1/2)*eta*(diff(f(eta), `$`(eta, 2)))) = 0

diff(diff(diff(f(eta), eta), eta), eta)+(diff(diff(f(eta), eta), eta))*f(eta)-(diff(f(eta), eta))^2-(diff(f(eta), eta)) = 0

(1)

ode2 := diff(theta(eta), `$`(eta, 2))+Pr*(f(eta)*(diff(theta(eta), eta))-(diff(f(eta), eta))*theta(eta)-A*(theta(eta)+(1/2)*eta*(diff(theta(eta), eta)))) = 0

diff(diff(theta(eta), eta), eta)+7*f(eta)*(diff(theta(eta), eta))-7*(diff(f(eta), eta))*theta(eta) = 0

(2)

Pr := 7; M := 1; A := 0; bcs := f(0) = 0, (D(f))(0) = 1, (D(f))(inf) = 0, theta(0) = 1, theta(inf) = 0

sol := dsolve({ode1, ode2, f(0) = 0, theta(0) = 1, theta(3) = 0, (D(f))(0) = 1, (D(f))(3) = 0}, numeric)

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(18, {(1) = .0, (2) = .11080390256348639, (3) = .22591844139106548, (4) = .34588964281348056, (5) = .4716523343043259, (6) = .6080709818887069, (7) = .7600144888376885, (8) = .9331124675025984, (9) = 1.1254061717692387, (10) = 1.340712579997116, (11) = 1.5699796896279121, (12) = 1.8077330699474043, (13) = 2.0488154095847557, (14) = 2.2915494979600313, (15) = 2.5347874698936588, (16) = 2.738137142308144, (17) = 2.882246313702448, (18) = 3.0}, datatype = float[8], order = C_order); Y := Matrix(18, 5, {(1, 1) = .0, (1, 2) = 1.0, (1, 3) = -1.4159579312952832, (1, 4) = 1.0, (1, 5) = -2.966721570427869, (2, 1) = .10254790936620359, (2, 2) = .854766138142636, (2, 3) = -1.2108609938844022, (2, 4) = .7119702204189595, (2, 5) = -2.2529443484676825, (3, 1) = .1933386248397818, (3, 2) = .7261141498797105, (3, 3) = -1.0292712167948561, (3, 4) = .48896558594153866, (3, 5) = -1.6439561023334552, (4, 1) = .273445019233398, (4, 2) = .6125153444881043, (4, 3) = -.8690340270440551, (4, 4) = .32285107977526273, (4, 5) = -1.1478776583047943, (5, 1) = .3439929065438903, (5, 2) = .5123623671028084, (5, 3) = -.7278866150546854, (5, 4) = .20401398115921057, (5, 5) = -.763208344331232, (6, 1) = .40752931110225393, (6, 2) = .42201870569082767, (6, 3) = -.6007171044019981, (6, 4) = .12094570617836783, (6, 5) = -.4741731754914774, (7, 1) = .4651864587138374, (7, 2) = .3398323246314554, (7, 3) = -.48523177286065394, (7, 4) = 0.6576752588080015e-1, (7, 5) = -.2692387887187611, (8, 1) = .5172955042540776, (8, 2) = .2652555390343341, (8, 3) = -.3807189466982358, (8, 4) = 0.3190474268417667e-1, (8, 5) = -.13586992168519285, (9, 1) = .5618538011289125, (9, 2) = .20105229288952095, (9, 3) = -.29112510723583646, (9, 4) = 0.13862195042234635e-1, (9, 5) = -0.61068755991753085e-1, (10, 1) = .5990189139949184, (10, 2) = .14686791686626252, (10, 3) = -.21603895947752078, (10, 4) = 0.5293088810986395e-2, (10, 5) = -0.2398684513468548e-1, (11, 1) = .6275651982514946, (11, 2) = .10437407124731421, (11, 3) = -.15784002043588816, (11, 4) = 0.1850360300458294e-2, (11, 5) = -0.8570603055814197e-2, (12, 1) = .6483609430786376, (12, 2) = 0.7226679700792346e-1, (12, 3) = -.11471902808310486, (12, 4) = 0.6091866446731281e-3, (12, 5) = -0.2870227765852086e-2, (13, 1) = .6627748846812015, (13, 2) = 0.4854681847700357e-1, (13, 3) = -0.8387959478183746e-1, (13, 4) = 0.19384398500141045e-3, (13, 5) = -0.9287125684605533e-3, (14, 1) = .6723201351483533, (14, 2) = 0.30975418834191904e-1, (14, 3) = -0.6222095329896541e-1, (14, 4) = 0.59706045590324044e-4, (14, 5) = -0.2944620596708145e-3, (15, 1) = .6781752653451799, (15, 2) = 0.17771295886020957e-1, (15, 3) = -0.4730354171205899e-1, (15, 4) = 0.17267857573074266e-4, (15, 5) = -0.9246320604202312e-4, (16, 1) = .680875777271328, (16, 2) = 0.9081482731198172e-2, (16, 3) = -0.38660056708540926e-1, (16, 4) = 0.5233594843947423e-5, (16, 5) = -0.35019075932068573e-4, (17, 1) = .6817996720972286, (17, 2) = 0.3848564639774088e-2, (17, 3) = -0.3416424691997061e-1, (17, 4) = 0.15849264379686802e-5, (17, 5) = -0.17594629399520723e-4, (18, 1) = .6820229739725837, (18, 2) = .0, (18, 3) = -0.3131585750462712e-1, (18, 4) = .0, (18, 5) = -0.10027297369571506e-4}, datatype = float[8], order = C_order); YP := Matrix(18, 5, {(1, 1) = 1.0, (1, 2) = -1.4159579312952832, (1, 3) = 2.0, (1, 4) = -2.966721570427869, (1, 5) = 7.0, (2, 1) = .854766138142636, (2, 2) = -1.2108609938844022, (2, 3) = 1.709562552513841, (2, 4) = -2.2529443484676825, (2, 5) = 5.877219380436879, (3, 1) = .7261141498797105, (3, 2) = -1.0292712167948561, (3, 3) = 1.4523537901775314, (3, 4) = -1.6439561023334552, (3, 5) = 4.710195300149449, (4, 1) = .6125153444881043, (4, 2) = -.8690340270440551, (4, 3) = 1.2253234179610244, (4, 4) = -1.1478776583047943, (4, 5) = 3.581428680897506, (5, 1) = .5123623671028084, (5, 2) = -.7278866150546854, (5, 3) = 1.0252653946730563, (5, 4) = -.763208344331232, (5, 5) = 2.569471400816961, (6, 1) = .42201870569082767, (6, 2) = -.6007171044019981, (6, 3) = .844928321368076, (6, 4) = -.4741731754914774, (6, 5) = 1.7099657255202751, (7, 1) = .3398323246314554, (7, 2) = -.48523177286065394, (7, 3) = .681041583568359, (7, 4) = -.2692387887187611, (7, 5) = 1.033173189144707, (8, 1) = .2652555390343341, (8, 2) = -.3807189466982358, (8, 3) = .5325602395340744, (8, 4) = -.13586992168519285, (8, 5) = .5512346655868281, (9, 1) = .20105229288952095, (9, 2) = -.29112510723583646, (9, 3) = .40504406547017163, (9, 4) = -0.61068755991753085e-1, (9, 5) = .2596911714733248, (10, 1) = .14686791686626252, (10, 2) = -.21603895947752078, (10, 3) = .2978495247577146, (10, 4) = -0.2398684513468548e-1, (10, 5) = .10602171195140898, (11, 1) = .10437407124731421, (11, 2) = -.15784002043588816, (11, 3) = .21432292171292172, (11, 4) = -0.8570603055814197e-2, (11, 5) = 0.39002192905830964e-1, (12, 1) = 0.7226679700792346e-1, (12, 2) = -.11471902808310486, (12, 3) = .15186862419473446, (12, 4) = -0.2870227765852086e-2, (12, 5) = 0.13334772840962163e-1, (13, 1) = 0.4854681847700357e-1, (13, 2) = -0.8387959478183746e-1, (13, 3) = .10649690081988093, (13, 4) = -0.9287125684605533e-3, (13, 5) = 0.4374565119513037e-2, (14, 1) = 0.30975418834191904e-1, (14, 2) = -0.6222095329896541e-1, (14, 3) = 0.7376729513716532e-1, (14, 4) = -0.2944620596708145e-3, (14, 5) = 0.13987553406612672e-2, (15, 1) = 0.17771295886020957e-1, (15, 2) = -0.4730354171205899e-1, (15, 3) = 0.5016720679583185e-1, (15, 4) = -0.9246320604202312e-4, (15, 5) = 0.44109192048924695e-3, (16, 1) = 0.9081482731198172e-2, (16, 2) = -0.38660056708540926e-1, (16, 3) = 0.3548665222057664e-1, (16, 4) = -0.35019075932068573e-4, (16, 5) = 0.16723818542037767e-3, (17, 1) = 0.3848564639774088e-2, (17, 2) = -0.3416424691997061e-1, (17, 3) = 0.2715654843704532e-1, (17, 4) = -0.17594629399520723e-4, (17, 5) = 0.8401478572977908e-4, (18, 1) = .0, (18, 2) = -0.3131585750462712e-1, (18, 3) = 0.21358134267807444e-1, (18, 4) = -0.10027297369571506e-4, (18, 5) = 0.47871930210318376e-4}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(18, {(1) = .0, (2) = .11080390256348639, (3) = .22591844139106548, (4) = .34588964281348056, (5) = .4716523343043259, (6) = .6080709818887069, (7) = .7600144888376885, (8) = .9331124675025984, (9) = 1.1254061717692387, (10) = 1.340712579997116, (11) = 1.5699796896279121, (12) = 1.8077330699474043, (13) = 2.0488154095847557, (14) = 2.2915494979600313, (15) = 2.5347874698936588, (16) = 2.738137142308144, (17) = 2.882246313702448, (18) = 3.0}, datatype = float[8], order = C_order); Y := Matrix(18, 5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = -0.18590626968888025e-10, (1, 4) = .0, (1, 5) = 0.17061446195413568e-7, (2, 1) = -0.8086492453824127e-10, (2, 2) = 0.11239169969361501e-9, (2, 3) = -0.17894382018115469e-9, (2, 4) = -0.2747229862734361e-8, (2, 5) = 0.7452174135251449e-8, (3, 1) = -0.14637762509984906e-9, (3, 2) = 0.2029901127867211e-9, (3, 3) = -0.3084752042344079e-9, (3, 4) = -0.5611682898261589e-8, (3, 5) = 0.3172708709982656e-8, (4, 1) = -0.1991162591875237e-9, (4, 2) = 0.27545279238153786e-9, (4, 3) = -0.41229897600367154e-9, (4, 4) = -0.689782171184356e-8, (4, 5) = 0.1048380090726617e-8, (5, 1) = -0.2429145886361696e-9, (5, 2) = 0.3352274133908414e-9, (5, 3) = -0.4980269979534315e-9, (5, 4) = -0.5566748542036905e-8, (5, 5) = -0.468340954922355e-8, (6, 1) = -0.30239326738681016e-9, (6, 2) = 0.4172029271934021e-9, (6, 3) = -0.614633654217239e-9, (6, 4) = -0.27890080432292874e-9, (6, 5) = -0.21600417944053615e-7, (7, 1) = -0.41217209326336544e-9, (7, 2) = 0.5705970533572843e-9, (7, 3) = -0.8310622495108273e-9, (7, 4) = 0.11494949157187653e-7, (7, 5) = -0.6265982652059931e-7, (8, 1) = -0.6447247402051642e-9, (8, 2) = 0.898470779286956e-9, (8, 3) = -0.12917523407839026e-8, (8, 4) = 0.3212236168399007e-7, (8, 5) = -0.1429155408239229e-6, (9, 1) = -0.9531312017921465e-9, (9, 2) = 0.13350030329748363e-8, (9, 3) = -0.19028846487794993e-8, (9, 4) = 0.41778594194087756e-7, (9, 5) = -0.18708234256718512e-6, (10, 1) = -0.13838420901629499e-8, (10, 2) = 0.19462318572222827e-8, (10, 3) = -0.2756346741189889e-8, (10, 4) = 0.3373261275381019e-7, (10, 5) = -0.15815211597579714e-6, (11, 1) = -0.1563835155835792e-8, (11, 2) = 0.22041431263277762e-8, (11, 3) = -0.3107306227599534e-8, (11, 4) = 0.15327555187430568e-8, (11, 5) = -0.15766659824515895e-7, (12, 1) = -0.14091394759357702e-8, (12, 2) = 0.1988961804499738e-8, (12, 3) = -0.27888452549708894e-8, (12, 4) = -0.14697003645653533e-7, (12, 5) = 0.6134940340948731e-7, (13, 1) = -0.10268402401829339e-8, (13, 2) = 0.14507823030224331e-8, (13, 3) = -0.2015726229432468e-8, (13, 4) = -0.11342594440856882e-7, (13, 5) = 0.48415287223161295e-7, (14, 1) = -0.6085185476324706e-9, (14, 2) = 0.8583867592547979e-9, (14, 3) = -0.1170097949913155e-8, (14, 4) = -0.3888183396942034e-8, (14, 5) = 0.14476556515912115e-7, (15, 1) = -0.2605931357377985e-9, (15, 2) = 0.35950926606495426e-9, (15, 3) = -0.4631322591966298e-9, (15, 4) = 0.9477006846236126e-10, (15, 5) = -0.4153838656000498e-8, (16, 1) = -0.54665210522375424e-10, (16, 2) = 0.6811663399393606e-10, (16, 3) = -0.46257911085063764e-10, (16, 4) = 0.7790327343268495e-9, (16, 5) = -0.7491400328772006e-8, (17, 1) = -0.11211122425853728e-10, (17, 2) = 0.12385662727576435e-10, (17, 3) = 0.41106271841654664e-10, (17, 4) = 0.3698977274849841e-9, (17, 5) = -0.5603842352003619e-8, (18, 1) = 0.21268663471074856e-11, (18, 2) = .0, (18, 3) = 0.6647521101845436e-10, (18, 4) = .0, (18, 5) = -0.387292652011095e-8}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[18] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.8708234256718512e-7) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [5, 18, [f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), theta(eta), diff(theta(eta), eta)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[18] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[18] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(5, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(18, 5, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(5, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(18, 5, X, Y, outpoint, yout, L, V) end if; [eta = outpoint, seq('[f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = yout[i], i = 1 .. 5)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[18] elif outpoint = "order" then return 6 elif outpoint = "error" then return HFloat(1.8708234256718512e-7) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [5, 18, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[18] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[18] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(5, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(18, 5, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(5, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0.}); `dsolve/numeric/hermite`(18, 5, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 5)] end proc, (2) = Array(0..0, {}), (3) = [eta, f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), theta(eta), diff(theta(eta), eta)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [eta = res[1], seq('[f(eta), diff(f(eta), eta), diff(diff(f(eta), eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = res[i+1], i = 1 .. 5)] catch: error  end try end proc

(3)

plots:-odeplot(sol, [[eta, f(eta)], [eta, theta(eta)]], eta = 0 .. 3, color = [red, blue])

 

 


 

Download dsolve_new.mw

See help on the  intsolve  command. Help quote: "When the solution contains integrals, they are represented with the inert Int." You can try to calculate these integrals by any methods, for example by  evalf(Int(...), method=...) .

First 76 77 78 79 80 81 82 Last Page 78 of 290