## 749 Reputation

11 years, 87 days

## use fsolve and solve to understand it !...

as maple help page :

fsolve( equations, variables, complex );

For a single polynomial equation of one variable with real coefficients, by default the fsolve command computes all real (non-complex) roots. It may not return all roots for exceptionally ill-conditioned polynomials.
but when u activate complex option,it does not return any complex part thus your solution does not have any complex part !

you can not solve your symbolic equation using fsolve, as u can see in the file uploaded !
hope it clearify the problem more !
good luck !

maple.mws

## problem in boundary conditions...

your boundary conditions should be of type numeric, when you use like "psi(h1)" maple assumes that psi is also function of h1 in addition to y, you should use definite numbers for h1 and h2 so that u can got the answer

## Use exact arithmetic...

u should use exact arthmetic like this link :

http://www.mapleprimes.com/questions/153233-How-To-Avoid-Round-Off-Errors-
good luck!

i also got zero in maple 17 !

## an example...

in your working directory,made a text file with this name : testfile.txt
i put numbers from 1 to 15 in every line of this text file, now i read every line of this text file and put them in a Vector named A.

> restart:
> A:=Vector(15):
> FileTools[Text][Open]( "testfile.txt" );

for i to 15 do
> od;

for i to 15 do
> A[i]
> od;

testfile.txt

## using sequence and hastype...

 > restart:n:=9999971;s:=0;
 (1)
 > for i from 2 while i<=(n/2) do if modp(n,i)=0 then s:=s+i; end if od; if s=0 then print( prime ) else not prime end if;
 (2)
 >

it computes in 8seconds, but still maple isprime is so better !
but this code in C# responses in about 1 seconds.

## write down system of differential equati...

write down system of differential equation in a regular mode so that we can help u in solving the system? i have created the function in maple , but my question is that u have the function phi, and your differential equations are in term phi, so what is the unkonw function that dsolve is going to solve ?! or where is the system of differential equation which are going to be solved?

function.mws

## u forgot u(t)...

i think your problem is here that u forgot to write u(t) here :

SOLN := dsolve( { a1,b1,c1, ICS }, {x1(t),y1(t),z1(t),u(t)} );
i added u(t) and it was solved in a short time :

## what do u exactly want to do ?...

what do u exactly want to do? do u know use of integration by parts? i think u can not use in your case , u should use integration by parts when u had an integration or your equations should be in form of integral, also u should use known functions to help u in more detailed way, for example :

with(IntegrationTools):
V := Int(exp(x)*cos(x), x);

Parts(V, cos(x));

or in definite integral

V := Int(exp(x)*sin(x), x = a..b);
Parts(V, sin(x));
Parts(V, exp(x));

u can refer to ?IntegrationTools,Parts for more information on integration by parts .

## Matrix or Vector...

 > restart:
 > V:=Vector(80);
 (1)
 > # u can see all of the elements are zero by this : # for i to 80 do V(i,1); od;
 > # or u can make a matrix like this :#M:=Matrix(80,1);
 (2)
 > M(1,1);
 (3)
 > # u can also make your matrix function of sth by this :# M1:=unapply(Matrix(80,1,a(t)),t):
 > M1(t)(1,1);
 (4)
 > # u can now make your a(t)s zero only in time 0 ,not in all of the time by this : # for i to 80 do a(0)(i,1):=0 od:
 > # u can see that all of the elements of the matrix are zero in time 0 # for i to 80 do M1(0)(i,1); od;
 >

## another way...

u can also use this method :

 > restart; de := diff(y(x), x\$2)+4*y(x) = exp(-3*x); `Diff(5,x)` := rhs(dsolve({de, y(0) = 2, (D(y))(0) = 0}, y(x)));
 (1)
 >

## too easy...

as Mr.Carl Love said. u should just type your codes or equations,so that we can help u on the issue.

here is an example :

 > S:=[seq](54054.054*sin(0.2*Pi*i),i=1..10);
 (1)
 > evalf(%);
 (2)
 >

## maybe ......

i think it is not a good approach to compare the abilities and facilities of a software with the other one since every software has its own goal to achieve. but if we want to treat it as a competitional issue,maybe it will be useful,maybe not. i think maple soft company should investigate their users so that findout what are the range in age of major maple users so that they decide whether it is convinient to provide more facilities for them or not.
afterall it is a nice comment and maybe practical.

## what do u mean by i1,i2,i3?...

i2 means i2=diff(y(x), x\$2)? or what ?

also u have many type problems,in equation 2 and 3 u have twice wrote i2 and i3 ?

if we consider i1=diff(y(x), x).i2=diff(y(x), x\$2),i3=diff(y(x), x\$3)

and also your second equation to be 2*i1+i2+2*i3 ... and the third to be 1/50*i3+4*i1-2*i2

we can do sth like this :

 > restart:
 > d1:=diff(y(t),t)-diff(y(t), t\$2)-diff(y(t), t\$3)=0;
 (1)
 > d2:=2*diff(y(t),t)+diff(y(t), t\$2)+2*diff(y(t), t\$3)-30-20*cos(5)-114*sin(5)=0;
 (2)
 > d3:=1/50*diff(y(t), t\$3)+4*diff(y(t),t)-2*diff(y(t), t\$2)=0;
 (3)
 > sys:={seq}(d || i ,i=1..3);
 (4)
 > with(inttrans): with(plots):
 > Lap1:=laplace(sys,t,s);
 (5)
 > Lp1:=subs(laplace(y(t),t,s)=Y(s),Lap1);
 (6)
 > ans:={seq}(solve(Lp1[i],Y(s)),i=1..3);
 (7)
 > for i to 3 do soln[i]:=invlaplace(ans[i],s,t); od;
 (8)
 >

u can plot these answer by assigning initial conditions like your last question.
u can easily subs your initial conditions in the answers and plot them.

## with ode plot and dsolve...

u can do like this :

d1:=diff(y(x),x,x)+2*diff(y(x),x)+2*y(x)-5=0;
ics := y(0)=0, D(y)(0)=0;

ans1:=dsolve({d1,ics},numeric);

with(plots):
odeplot(ans1,x=-1..1);

for two others,u can do sth simillar.

u can solve the odes in this way

dsolve(d1);

which gives u the general answer,but u can not plot the answer since it has a general form, and for plotting u should choose initial conditions like i did and thus u will need dsolve(numeric).

## where is dependence to a?...

u can write your sequence like this :

seq(f, i = m..n, step):

so that

a:=seq(i,i=1..150,0.5):

u can also refer to

?kronecker to see more about kronecker function in maple.

u can also create matrix in one of these forms :

M1 := `<|>`(0.1e-2, 0.5e-1, .151, .201, .301, .951, 2);

or as Markiyan says

M2 := Matrix([0.1e-2, 0.5e-1, .151, .201, .301, .951, 2]);

and there are so many ways to define a matrix, u can also apply a funtion to your matrix with the command map .

but we do not know here what do u want exacly?

 First 7 8 9 Page 9 of 9
﻿