emrantohidikub

15 Reputation

One Badge

0 years, 206 days

MaplePrimes Activity


These are questions asked by emrantohidikub

Hello Dear Maple Users and Experts

I am running this code for N=3, but fsoolve can not work and did not give me any output. Could you help me how can I get the result?

Actually, I got the result for N=2. Exact solution is a[0]=0, a[1]=1, a[2]=1, b[1]^2=sqrt(2) and b[1]^2+b[2]^2=sqrt(3). But, for N=3, I can not receive any results from fsolve

Here is my code

restart;
Digits := 20;
L := 1;
N := 3;
alpha := 1;
xexact := t -> t^sqrt(2) + t^sqrt(3);
f := simplify(fracdiff(t^sqrt(2), t, alpha)) + simplify(fracdiff(t^sqrt(3), t, alpha));
f := unapply(f, t);
xapp := a[0] + sum(a[j]*t^sum(b[i]^2, i = 1 .. j), j = 1 .. N);
xapp := unapply(xapp, t);
xfrac := sum(a[jj]*simplify(GAMMA(sum(b[ii]^2, ii = 1 .. jj) + 1)/GAMMA(sum(b[ii]^2, ii = 1 .. jj) + 1 - alpha))*t^(sum(b[ii]^2, ii = 1 .. jj) - alpha), jj = 1 .. N);
xfrac := unapply(xfrac, t);
xfrac1 := sum(a[jj]*simplify(sum(b[ii]^2, ii = 1 .. jj)^(alpha + 1)/(sum(b[ii]^2, ii = 1 .. jj) - alpha))*t^(sum(b[ii]^2, ii = 1 .. jj) - alpha), jj = 1 .. N);
xfrac1 := unapply(xfrac1, t);
S1 := {seq(evalf(xfrac(k/(2*N)*L)) - evalf(f(k/(2*N)*L)) = 0, k = 1 .. 2*N)};
S2 := {xapp(0) = 0};
S := S1 union S2;
sol := fsolve(S);

Hello everyone

I want to use some limitations in fsolve by using seq command, but I can not achieve to any solution.

Can you help me?

I provided my maple codes here

restart;
f := sin(x[1] + x[2]) - exp(x[1])*x[2] = 0;
g := x[1]^2 - x[2] - 2 = 0;
cond := {seq(x[i] = -1 .. 1, i = 1 .. 2)};

fsolve({f, g}, cond);

Hello Dear Professional users,

I have a question regarding the "fsolve" command and also the "assign" command in Maple.

In my previous codes, I just used one time from "fsolve" and then "assign" command.

Today, I want to use "fsolve" and "assign" in a for loop. But, I can not get the results correctly.

For example, previously I reach a system of algebraic equations and the solve my problem easily:

N:=8:
y:=sum(a[n]*t^n,n=0..N):
y:=unapply(y,t):
*****some calculations with a[n] coefficients *****
A:={a set of nonlinear algebraic equations in terms of a[n]}%The number of equations is N+1 (same as the number of a[n] for n=0..N)
sol:=fsolve(A):
assign(sol)
plot(y(t),t=0..1)

****************************************************************************************************
****************************************************************************************************
****************************************************************************************************

Today, my problem is:

N:=8:
M:=4:
for i from 1 to M do
y[i]:=sum(a[i,n]*t^n,n=0..N):
y[i]:=unapply(y[i],t):
end do
for i from 1 to M do
*****some calculations with a[n] coefficients *****
@A[i]:={a set of nonlinear algebraic equations in terms of a[i,n]}%The number of equations is N+1 (same as the number of a[n] for n=0..N)
@sol[i]:=fsolve(A[i]):
@assign(sol[i])
@plot(y[i](t),t=0..1)
end do
****************************************************************************************************
****************************************************************************************************
****************************************************************************************************

What I should write instead of "A[i]", "sol[i]", and "assign(sol[i])" the lines started with
@A[i],....
@sol[i],...
@assign(sol[i]),....

Thanks for your attention in advance

With kind regards,
Emran

Page 1 of 1