MaplePrimes Questions

Hi,

Please help me in solving system consist the three differential equations with three unknowns. I did already a few attempts, but I can not finish. Once in the final result was got RootOf and do not know what to do. I tried also numerically. I very very ask for some suggestions: ( 

with the boundary condition

parameters A,B,C are constans

 

1)

qa1 := A1*(diff(Tg(x), x, x))+A2*(diff(Tg(x), x))+(A3+A4)*Tg+A3*Tz+A4*Tw = 0;

eqa2 := B1*(diff(Tw(x), x, x))+B2*(diff(Tw(x), x))+(B3+B4)*Tw+B3*Tz+B4*Tg = 0;

eqa3 := C1*(diff(Tz(x), x, x))+(C3+C4)*Tz+C3*Tg+C4*Tw = 0

2)

On paper, the system of three equations with three unknowns I changed to system of two equations with two unknowns but still nothing. 

A[1] := 2, 

eqa1 := A[1]*C[1]*(diff(z(x), x, x, x, x))/C[3]+A[2]*C[1]*(diff(z(x), x, x, x))/C[3]+(A[1]*C[3]+A[1]*C[4]+A[3]*C[1]+A[4]*C[1])*(diff(z(x), x, x))/C[3]+(A[1]*C[3]+A[1]*C[4])*(diff(z(x), x))/C[3]+(A[3]*C[3]+A[3]*C[4]+A[4]*C[3]+A[4]*C[4]+A[3]*C[3])*z(x)/C[3]+A[1]*C[4]*(diff(y(x), x, x))/C[3]+A[2]*C[4]*(diff(y(x), x))/C[3]+(A[3]*C[4]+A[4]*C[4]+A[4]*C[3])*y(x)/C[3] = 0;

eqa2 := B[4]*C[1]*(diff(z(x), x, x))/C[3]+(B[4]*C[3]+B[4]*C[4]+B[3]*C[3])*z(x)/C[3]+B[1]*(diff(y(x), x, x))+B[2]*(diff(y(x), x))+(B[4]*C[3]+B[4]*C[4]+B[3]*C[3])*y(x)/C[3] = 0;

row := eqa1, eqa2;

sol := dsolve({row}, {y(x), z(x)});

 

Thank you very much for your help.

Ewa.

Dear all,

I need to compute the error, How to define the error between the exact and approximation.

 

                               d              
                              --- y(x) = -y(x)
                               dx             
                               y(x) = exp(-x)

 

I have a problem in this code, my goal is to compute the error between the approximate solution obtained by RK3 and Exact  and E ( approximation by RK3).

How to definie the error and prouve that the error is O(h^4)  ( with one step) and the global error is O(h^3).

Thank you  for helping me.

 

 

 

Hi,

I have a problem with dsolve in the following code

restart;
>
n:=20;
m:=1;
cc:=-200;
zzeta:=0.1;
sefr1:=0.3;
sefr:=0.2;
MM:=0;
lambda:=0.1;
Br:=1;
nn:=3;
>
>
#u(tau):=tau;
u(tau):=421.7129935*tau-2217.587728*tau^2+8897.376593*tau^3-27612.59182*tau^4+64248.00336*tau^5-1.083977605*10^5*tau^6-10.57029600-1.080951714*10^6*tau^13+7.999517316*10^5*tau^14-4.788741005*10^5*tau^15+2.309563748*10^5*tau^16+26511.11102*tau^18-5959.001794*tau^19+1.148523882*10^5*tau^7-95.23809524*tau^21+4.545454545*tau^22-9435.563781*tau^8-2.587683745*10^5*tau^9+6.473880128*10^5*tau^10+948.0272727*tau^20-88660.41892*tau^17-1.008692404*10^6*tau^11+1.175504242*10^6*tau^12;
>
>
B := 1+(2*(1-zzeta))*Br*(int(tau*(diff(u(tau), tau))^2, tau = (1/2)*zzeta*(1-zzeta) .. 1/2*(1-zzeta)));
eq4 := 4*B*u(tau)-(1+zzeta)*(diff(tau*(diff(theta(tau), tau)), tau))/tau-(1+zzeta)*Br*(diff(u(tau), tau))^2;


theta(tau):=sum(p^ii*theta[ii](tau),ii=0..nn);
HH:= p*((4*(1+(2*(1-zzeta))*Br*(int(tau*(diff(u(tau), tau))^2, tau = (1/2)*zzeta*(1-zzeta) .. 1/2-(1/2)*zzeta))))*u(tau)-(1+zzeta)*(diff(theta(tau), tau)+tau*(diff(theta(tau), tau, tau)))/tau-(1+zzeta)*Br*(diff(u(tau), tau))^2)+(1-p)*(diff(theta(tau),tau$2)):
eq5:=simplify(HH):
eq6:=collect(expand(eq5),p);

eq7:=
convert(series(collect(expand(eq5), p), p, nn+1), 'polynom');


for ii to nn do
ss[ii] := (coeff(eq7, p^ii)) ;
print (ii);
end do;

ss[0]:=diff(theta[0](tau), tau, tau);

icss[0]:=theta[0](zzeta/(2*(1-zzeta)))=0, D(theta[0])(1/(2*(1-zzeta)))=1;

dsolve({ss[0], icss[0]});
theta[0](tau):= rhs(%);


for ii to nn do
ss[ii]:=evalf[5](ss[ii]);
icss[ii]:=theta[ii](zzeta/(2*(1-zzeta)))=0, D(theta[ii])(1/(2*(1-zzeta)))=0;
dsolve({ss[ii], icss[ii]});
theta[ii](tau):=rhs(%);
end do;

I would be most grateful if you help me to find this problem.

Thanks for your attention in advance

 

How to find the equation of the tangent line to f(x)=6x/squareroot(x^2+12) at the point (2,3) ?

Dear all,

Please someone gave an idea,

I write in maple this line but  I get an error,

> Butcher, map(x->if (x=0) then `` else x end if,Butcher);
Error, invalid arrow procedure


Is it possible to describe billiards in the unit square (see http://en.wikipedia.org/wiki/Dynamical_billiards for info) in terms of events and if? For example, let the dynamical system
{x''(t)=0,y''(t)=0, x(0)=0.5, x'(0)=0.2, y(0)=0.5, y'(0)= sqrt(3)/5}
be given, where the trajectory [x(t), y(t)] satisfies the usual laws of reflection http://en.wikipedia.org/wiki/Reflection_%28physics%29 when reaching the boundary {x=0}, {x=1}, {y=0}, {y=1}. The same question about billiards in the unit disk.

hi everybody

I want to solve this system of equations


t*((p-.764*z-2.194768)^2-1.170308549+.529948*(z-.382)^2)-(1-t)*p
t*((p+.382*z+.661624*y-1.907568)^2-1.018097144+.529984*(-.866*y-.5*z-.382)^2)+(1-t)*y
t*((p+.382*z-.661624*y-2.470348)^2-1.31636154+.529984*(.866*y-.5*z-.382)^2)+(1-t)*z


while t varies from 0 to 1 by 0.0001 interval. Using newton raphson method, the inital value for each step is the result of the previous step for y,z,p. the very initial values are y=1,z=1,p=1


please help me. Thanks

I'm having a weird memory leak problem when I use Compiler, and numerical NAG routines for integration - at least I think it's that combination that's causing it. To see it run this:

First define the functions to use:

F_:=Compiler:-Compile(codegen[prep2trans](codegen[optimize](codegen[makeproc](convert(sinh(x)*sin(x),float),[x]))),optimize=true);

F:=proc(k)
if not (k::numeric) then return 'procname'(args) fi;
F_(k);
end proc;

INT:=proc(X) if not X::numeric then return 'procname'(x) fi; int(F(x),x=0..X,numeric,method=_d01ajc); end proc;

 

Then evaluate lots of times:

for i to 10^6 do a:=rand()/1e12; INT(a);  od:

 

And watch your computer memory go wild. I'm using Maple 17 on a new mac with 8Gig RAM, using Mavericks. It doesn't take more than a few minutes to grind the system to a halt. A restart command does not release the memory in the mserver process. [I've noticed similar problems in the past, so it's not locallised to this OS I think.]

 

On a related note, there's a problem with nested NAG integrals - in the do loop try this:

 

int('INT'(XX),XX=0..a,numeric,method=_d01akc)-int('INT'(XX),XX=0..a,numeric,method=_d01ajc);

 

it never gives zero! The problem lies in using the same NAG routine twice [here _d01ajc] for a nested integral. I've never found a way around this bug!

 

Any help would be much appreciated!

 

Good afternoon sir.

 

I am working on problems related to functions which require dynamic geometry program or

the Geometers sketch pad. I request to you to kindly suggest me with regard to the above cited query.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

I am trying to graph the cube root of x, but when I do as

plot(x^1/3,thickness=5)

I get a graph with domain of non negative reals.  I need the entire graph, across all reals and I'm not sure how to handle it.  Thanks

Hello Maple users friends,

I have two lines in the space (x,y,z) described by the equations in L1 and L2:

 

L1:= {4*x + 3*y + z = 0, x + y - z - 15 = 0}:

L2:={12*x + 5*y + 7*z -13 = 0, 9*x + y -3*z - 5 = 0}:

I would like the get the parametric (with z=t) equations P1 and P2 of the two lines..

I see the "form" of such parametric equations P1 and P2 using "solve"

solve(L1, {x, y}); solve(L2, {x,y});

 

but I do not know how to use those values to get my parametric equations P1 and P2 to continue with additional computation (area, volume etc).

Thanks for your attention and help.

JJ

Dear all

I would like to convert Matlab code to Maple, is there anu idea, this is the code.

 

% Usage: [y t] = abm4(f,a,b,ya,n) or y = abm4(f,a,b,ya,n)
% Adams-Bashforth-Moulton 4-th order predictor-corrector method for initial value problems
% It uses
% Adams-Bashforth 4-step method as a precdictor,
% Adams-Moulton 3-step method as a corrector, and
% Runge-Kutta method of order 4 as a starter
%
% Input:
% f - Matlab inline function f(t,y)
% a,b - interval
% ya - initial condition
% n - number of subintervals (panels)
%
% Output:
% y - computed solution
% t - time steps
%
% Examples:
% [y t]=abm4(@myfunc,0,1,1,10);          here 'myfunc' is a user-defined function in M-file
% y=abm4(inline('sin(y*t)','t','y'),0,1,1,10);
% f=inline('sin(y(1))-cos(y(2))','t','y');
% y=abm4(f,0,1,1,10);

function [y t] = abm4(f,a,b,ya,n)
h = (b - a) / n;
h24 = h / 24;

y(1,:) = ya;
t(1) = a;

m = min(3,n);

for i = 1 : m % start-up phase, using Runge-Kutta of order 4
    t(i+1) = t(i) + h;
    s(i,:) = f(t(i), y(i,:));
    s2 = f(t(i) + h / 2, y(i,:) + s(i,:) * h /2);
    s3 = f(t(i) + h / 2, y(i,:) + s2 * h /2);
    s4 = f(t(i+1), y(i,:) + s3 * h);
    y(i+1,:) = y(i,:) + (s(i,:) + s2+s2 + s3+s3 + s4) * h / 6;
end;

for i = m + 1 : n % main phase
    s(i,:) = f(t(i), y(i,:));
    y(i+1,:) = y(i,:) + (55 * s(i,:) - 59 * s(i-1,:) + 37 * s(i-2,:) - 9 * s(i-3,:)) * h24; % predictor
    t(i+1) = t(i) + h;
    y(i+1,:) = y(i,:) + (9 * f(t(i+1), y(i+1,:)) + 19 * s(i,:) - 5 * s(i-1,:) + s(i-2,:)) * h24; % corrector
end;

Dear all

Is there any one can help me to find  the Maple code to solve ODE : y'(x)=f(x,y(x))  using n-step  Adams-Moulton Methods.

The code exist  with mathematica in this link:

http://mathfaculty.fullerton.edu/mathews/n2003/AdamsBashforthMod.html

there is also the code of this method with Matlab, see please:

 http://www.math.mcgill.ca/gantumur/math579w10/matlab/abm4.m

 

But I want file.mw ( with maple)

Thank you very much for helping me.

 

 

 

 

 

 

I'd like to get MAPLE to take this as an input: 1/2+(1/3)*sqrt(2) and give this as an output: (3+2sqrt(2))/6. For the life of me, I can't get it to do that.  I fieel like an idiot; it should be easy.

so we have to Write a function that diagonalises a complex (2x2) matrix if possible,  

we need the argument to be a (2x2) matrix say A.   and we need the return value to be a list [a1 ;a2 ;b1;b2] of two complex numbers followed by two 2-vectors such that {b1,b2} is a basis for C^2 and so that  

Ab1 =a1b1 , Ab2=a2b2  if these exist. if not then the function should return an empty list []

also, the thing is that we're not allowed to load any maple packages, we have to do it by hand :'(

thanks <3

 

First 1458 1459 1460 1461 1462 1463 1464 Last Page 1460 of 2426