MaplePrimes Questions

Hi!

Here below is the code I got problems:

#################################

Dens := proc(v)
local theta, r;
evalf[8](
    Int(
        Int(
            4*r/(1-0.84*cos(theta)^2)^(1/2)*exp(-r*(6.25-5.245*cos(theta)^2)^(1/2))
        , theta = 0. .. 2*Pi)
    , r = 0. .. v)
) assuming v>=0
end proc;

#
#

FitFinalDens := NonlinearFit(
  b*(1+a*u)/u*Dens(u/(1+a*u))
, depth
, veloc
, [u]
, initialvalues = [a = 1.4, b = 0.13]
, parameternames = [a, b]
, output = [leastsquaresfunction, residuals, parametervector]
, parameterranges=[a=1.1..3.0,b=0.02..0.8]
);

#################################

Then, I obtain two sort of errors:

First error message:

Error, (in Statistics:-NonlinearFit) invalid input: no implementation of NonlinearFit matches the arguments in call, 'NonlinearFit(0.13*(1.+1.4*u)*(int(int(4*r/..........

etc...

 

Second error message:

Error, (in Statistics:-NonlinearFit) complex value encountered

 

So, really I don't known how to correct the code.

I tried a lot  of things such as using  "value" command,  "Re" command, etc.

Do you have a solution?


Sincerely yours.

 

Jacqr

 

 

invalid input: LinearAlgebra:-Basis expects its 1st argument, V, to be of type {Vector, set(Vector), list(Vector)

A:=<<5,5,5>|<1,2,3>|<-5,1,2>>;
Basis(A);
 

restart;
with(Student[Calculus1]);
a := Int(exp(cos(x)), y = 0 .. sin(x), x = 0 .. (1/2)*Pi);
ShowSolution(a);
i get error 

 

Trying to solve:

solve (arctan((2*x^2-1)/(2*x^2+1)) = 0, x);

The answer I get is the original function:

 
            arctan((2*x^2-1)/(2*x^2+1))

 

This example is from the Maple book by Keck, and he shows the Maple V answer as

1/2 sqrt(2) -1/2 sqrt(2)     

Suggestions?

Hi every body : 

I want to slove this below PDE with conditions 1&2, can every body help me, tnx.

PDE := diff(u(x, t), t)+6*u(x, t)*(diff(u(x, t), x))+diff(u(x, t), x, x, x) = 0;

1.x=0

2.assume t is step function(Heaviside).

with regards....

restart;
sol:=dsolve(diff(y(x),x)= x/(sqrt(x^2-16))*1/(2*y(x)),y(x));

Gives

But the solution can also be written as

I just do not know how to transform the first solution to the second simpler one. I tried:

sol:=map(x->rhs(x),[sol]);
simplify(sol,radical);

Also tried simplify(sol,sqrt); simplify(sol,radical,symbolic); simplify(sol,size);

The simpler solution can be found as follows

restart;
sol:=dsolve(diff(y(x),x)= x/(sqrt(x^2-16))*1/(2*y(x)),y(x),'implicit');

But the term in the middle above is

Therefore the solution is really

eq:=y(x)^2-sqrt(x^2-16)-_C1 = 0;
solve(eq,y(x));

Which gives

What command to simplify the long solution to the shorter one obtained from the implicit?

 

The solution by Maple below is correct, but non-the-less, a little strange.

restart;
dsolve(diff(y(x),x)=3*x^2*(y(x)^2+1),y(x));

Gives

Ofcourse 3*constant is still constant. But it is a little strange and have no reason for it to be there.  When I solve it by hand

What could made Maple put the 3 in there? Again, solution is 100% correct, but it could be simpler.

Maple 2017.1

 

 

I have Imported a CAD model (.sty) into maple. What I want to do is rotate the model along several axes. At first I want to rotate it around its center. This can be done via 

rotate(Zylinder, 2, 3, 56)

where Zylinder is the Object I importet via

Zylinder := Import("C:/...")

this works fine, but I want the rotation to be a continuous animation. I tried:

animate(rotate(Zylinder, A, 0, 0), A = 0 .. 360)

but that does not work. Can you please tell me how to make it work? And it would be great if the aproach would work for rotations around an axis away from the center, too.

I don't recall ever changing any settings in my copy of Maple 16. But for some reason, I tried to make a plot and it spit out line-printed output rather than a regular plot.

How do I change this back? I have no use for line-printed output.

lineprinted_fail.mw
 

plot([E1(x), E2(x), E3(x)], x = 0 .. 5, title = "Nitrogen Nucleus Second-Order Energy Shifts")


                                                                              
                  Nitrogen Nucleus Second-Order Energy Shifts                 
  |                                                                           
  +                                                                     HHHHH
6e-08                                                               HHHHH     
  +                                                            HHHHHH         
4e-08                                                     HHHHHH              
  +                                                  HHHHHH                   
  +                                           HHHHHHH                         
2e-08                                  HHHHHHHH                               
  +                           HHHHHHHHHH                                      
  +             HHHHHHHHHHHHHHH                                               
  ***************************************************************************
0 +              1    HHHHHHHHHH2HH           3              4              5
  +                               HHHHHHHHH                                   
-2e-08                                    HHHHHHHH                            
  +                                              HHHHHHH                      
-4e-08                                                 HHHHHH                 
  +                                                         HHHHHH            
  +                                                              HHHHH        
-6e-08                                                                HHHHH   
  +                                                                       HHH
                                                                              

 

NULL

``


 

Download lineprinted_fail.mw

 

To translate maple code to C or C++ or whatever i would call then placing that maple code inside a C(),

is there a command for doing the reverse?

1.op(0,Expr) , op(1,Expr)

2. indets(eq1,{string,name})

3. type(varlist[ii], function)

I am not able to understand why Maple fails to compute and display the integrals for Eqn (1) and Eqn (8). I have a integral table to cross-verify the integrals for each of these in here

 

Also, another integral I am trying to calculate in MWE2 (attached file) in which the integral computed doesn't make any sense.

MWE-2.mw

 

int(sqrt(x^3.(ax+b)), x)

int((x^3.(ax+b))^(1/2), x)

(1)

2+2

4

(2)

int(7*x^3+3*x^2+5*x, x)

(7/4)*x^4+x^3+(5/2)*x^2

(3)

int(1, x)

x

(4)

int(1/(x^2+1), x)

arctan(x)

(5)

int(1/(ax^2+bx+c), x)

x/(ax^2+bx+c)

(6)

int(x^n, x)

x^(n+1)/(n+1)

(7)

int(sqrt(x(ax+b)), x)

int(x(ax+b)^(1/2), x)

(8)

``


 

Download MWE-1.mw

Suppose that I have an expression of the form  eq:=a*x^2+b*y^2+c*x*y, where x,y are real numbers, a>0, b<0, and c>0. Is there a relatively simple way to separate the positive, negative, and indeterminate terms from such an expression. In other words, I want to get  

eq_positive=a*x^2,

 eq_negative=b*y^2,

eq_indeterminate=c*x*y.

Thanks

See Wiki and the description  in flame_draves.pdf for info and an example below.

Dear Community,

I try to solve the following very simple ODE symbolically with the ODE Analyzer assistant, yet Maple says "unble to obtain solution". :-/

If I try to slove it with dsolve, nothing happens. Is it really so difficult?

diff(p(h),h)=A/(B+C*p(h)), p(h0)=p1

A, B, C, h0 and p1 are constants. I use Maple 2016.

Tx in advance,

best egards

Andras

First 952 953 954 955 956 957 958 Last Page 954 of 2429