Rouben Rostamian

MaplePrimes Activity


These are answers submitted by Rouben Rostamian

Perhaps this is what you want:

f := n -> 2*(1-n)/3:
seq(`if`(type(f(i), integer), f(i), NULL), i=-5..5):
convert([%], Vector);

 

I attempted to figure out what you had in mind when writing your proc, but I couldn't.  It appears that you have an incorrect idea of what Vector[row](k) does.  You should know that It returns a vector of length k of zeros, and that's certainly not what you need.  Perhaps if you explain your idea in words, you will get more useful help.

If T and c are functions of x only, then you have ordinary differential equations.  If they are functions of x and y, then you have partial differential equations.  Those two types of equations are quite different beasts.  Within each type you may have an initial value problems or a boundary value problems; they call for different techniques.  So it is difficult to provide a useful answer to your question.  To get started, you will need to make a mathematical model of the phenomena which you wish to describe, then derive the equations, most likely by applying laws of physics, and then figure out the initial and boundary conditions from auxilary information that your model provldes.  Only then it will make sense to turn your attention to solving the equations.

I don't have an answer to your question.  I do, however, have a couple of observations.

First, the notation Int(f(x), x=0..x) is not quite correct, because it uses the symbol x with two totally unrelated meanings: (a) x as the variable of integration, and (b) x as an integration limit.  To fix, you should write Int(f(t), t=0..x).

Second, Maple's applyrule() apparently has difficulty in matching complex rules.   Consider, for instance,

applyrule(Int(f, t=a..b) = z , Int(f, t=a..b));

This correctly returns z.  The following should return z as well, but it doesn't:

applyrule(Int(f::anything, t = a::integer .. b::integer) = z , Int(f, t = 2 .. 5));

I don't know why and I don't have an alternative solution.

Hi, you say you had family problems and you didn't attend most of the lectures.  Now you are asking for a solution to a homework assigment.  Submitting someone else's work as your own is plagiarism.  Don't do it!

I suggest that you talk to your teacher to see if he/she can accommodate your case in view of extenuating circumstances.

Did you make up that Font(14) bit?  I don't think that's anywhere in the documentation.

Try replacing
    axesfont = [Font(14), Font(14)]
with

    axesfont = [TIMES, 36]
and see the effect.  See the help page on "plot,options" for the full range of font changing options.

As Acer said, Maple maintains a full representation of the matrix internally.  The abbreviated display is merely for convenience.  What would be the use of the full display of a 10000x10000 matrix?

Nevertheless, you may see the full contents of a matrix M by the command evalm(M), if you so desire.

You didn't say what f and h are, so here is something I made up:

restart;

f := u -> cos(u);

proc (u) options operator, arrow; cos(u) end proc

(1)

h := u -> 1/(1 + cos(u) + sqrt(1 + u^4));

proc (u) options operator, arrow; 1/(1+cos(u)+sqrt(1+u^4)) end proc

(2)

v := unapply(Int(h(s), s=0..u), u);

proc (u) options operator, arrow; Int(1/(1+cos(s)+(s^4+1)^(1/2)), s = 0 .. u) end proc

(3)

plot([v(u), f(u), u=0..1]);

 

 

Here is a worksheet conttaining the commands shown above:  doit.mw

Consider showing what you have done so far, where you are stuck, and where you need help.  If you have no idea where to start, then you should go read your class notes for a while.

From your message it is not clear how much you know, and therefore how much help you need.  Surely you are not asking for a complete solution to your homework problem, are you?

Shooting in the dark, here is somethng to get you started.  Instead of your 3D problem, I will do something similar in 2D.  See if it makes sense.

with(plots): with(plottools):
y := x -> 1 + x^2;
n := 10;
X := Array(0..n, i -> -1 + 2/n*i):
Y := Array(0..n, i -> y(X[i])):
p1 := seq(rectangle([X[i],0], [X[i+1],Y[i+1]], color=yellow), i=0..n-1):
p2 := plot(y(x), x=-1..1):
display([p1,p2]);




There is no unique way of doing that.  For instance, in your example, you also have:

@JohnPo Your initial question noted too may levels of recursion.  The error message in your worksheet, however, indicates insufficient memory.

In any case, since your objective is to solve Ax=b, you may do it without computing the inverse.  Try the LinearSolve() function from the LinearAlgebra package.

Perhaps it's best if you would ask your teacher for help.  He/She can gauge the amount of appropriate help that may be supplied in order to make this a worthwhile learning experience for you.  Your questions are not about Maple after all; they are about how to solve the assigned problem.

I assume you know about

    interface(imaginaryunit=j);

See if you can stick it in Maple's initialization file.  In Linux it is "~/.mapleinit".  I don't know what it is in other operating systems.

First 50 51 52 53 Page 52 of 53