Questions tagged [homework]

Homework questions are welcome, as long as they are asked honestly, explain the problem, and show sufficient effort. Please do not use this as the only tag for a question. Please do not add this tag to questions by other people unless they explicitly say that their question is part of their homework.

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

Can I sample from a distribution whose parameters depend on the current iteration?

Let's say I want to sample from 100 Beta distributions, and in each successive one, the first parameter increases by 1. So given a current iteration number n, I ...
1
vote
1answer
47 views

Prove that these statements about the integer x: If 3x + 7 is even, then x + 3 is even [closed]

Then there exists some integer k where x=2k So 3x+7=3(2k)+7 6k+7 This is as far as Ive got.
0
votes
1answer
39 views

Problem with Real Digits and and getting the sum of digits [closed]

I want to find the sum of the digits of the first 30 000 multiples of 31. I started by first finding the multiples. Like this: ...
1
vote
2answers
97 views

Dice Rolling Simulation [closed]

I'm simulating a sequence of dice rolls by choosing a random integer between 1 and 6. I need to use FoldList to generate a function that returns a list which describes how the cumulative total varies ...
1
vote
0answers
55 views

Filtering Fibonacci numbers for elements meeting certain criteria [closed]

Write a code that selects in less than two seconds from every 123rd of the first 33,333 even Fibonaci numbers; those which contain the digits 2, 3, 6, 7, and 8 and also contains the digit 1 more than ...
2
votes
2answers
65 views

Tensor contraction

How do I let mathematica compute a tensor contraction like $\delta_{ab}\delta_{bc}$ with an output $\delta_{ac}$ efficiently? I tried TensorContract and TensorReduce but they were not helpful. ...
5
votes
1answer
154 views

How to plot trajectories of the Rossler System [duplicate]

This is my current homework problem. I have completed parts a and b, but am now stuck on part c. I'm not sure what it means by plot the trajectories with different initial conditions, nor am I 100% ...
0
votes
3answers
39 views

Recursive Function with conditionals [duplicate]

Function: I am to solve for $T_{12}(4.8), T_{24}(1.2)$, using If and Which functions. I started with this function and keep getting a recursion limit error: ...
0
votes
0answers
27 views

Need to obtain an output for various functions in a 2D random walk [closed]

Part1 s = {0., 0.}; path = Table[s += RandomReal[{-0.5, 0.5}, 2], {100}]; ListLinePlot[path, ImageSize -> Small] path Part2 totalDistance = 0; I need to use ...
3
votes
1answer
69 views

Converting numbers and expressions

Trying to create a rule to convert negative numbers/expressions positive. So far: f[-x_]:> f[x] Trying to extend this rule to floats such as -1.0 and ...
3
votes
2answers
99 views

Using Map to extract elements of a list

I am given this problem. ...
1
vote
1answer
96 views
1
vote
1answer
61 views

Am I using DSolve correctly? [closed]

I'm new to Mathematica but I think I solved the problem shown below. I want to know if I solved it right. Your response will be much appreciated. ...
0
votes
0answers
21 views

How to disable autosimplification of boolean function? Or How to get Perfect Disjunctive Form?

In my university I have a task to get a perfect disjunctive form of a function in Mathematica, so I found necessary minterms and I want to get disjunction of them. I need to get 5 minterms, but I have ...
-1
votes
1answer
50 views

Single toss of two dice [closed]

Does any one knows answer for this question related to probability? A pair of fair dice is tossed once. If the sum of the two numbers is greater than 9, the probability that one of the numbers is a ...
-2
votes
2answers
145 views

Find the square root using a recursive formula [closed]

I want to approximate the square root x=Sqrt[a] for $a>0$ using the the formula $x_{n+1}=\frac{1}{2}(x_n+a/x_n)$. How can I do this?
0
votes
1answer
60 views

Computing the average curvature of a curve [closed]

Compute the average curvature of the curve $\qquad r(t) = ⟨t \cos t,\, t \sin t⟩\ \mathrm{for}\ 0 ≤ t ≤ 2π$. Use Mathematica to arrive at an exact value and its numerical approximation. ...
1
vote
0answers
34 views

Need help with understanding a question concerning the power iteration method [closed]

I just need help understanding a question. I was given the question Use the power iteration method to estimate the spectral radius for (I - B A) given a tridiagonal coefficient matrix. Although,...
0
votes
1answer
85 views

Find the points closest to and farthest from the origin for a region in $\mathbb{R}^6$

Given $A$ being the intersection set between $x + y + z + u + v + w = 1$ and $x^2 + y^2 + z^2 + u^2 + v^2 = 1$, find the closest and farthest points to the origin that belong to $A$ in the space $\...
1
vote
0answers
66 views

How do I transform a 1st order logic formula into Skolem normal form? [closed]

I have a predicate calculus (1st order logic) problem. I have the formula $\qquad \forall x[\neg P(x) \land \forall y \neg Q(x,y) \rightarrow \forall x \forall y R(x,y,z)]$ I wamt to express this ...
0
votes
0answers
61 views

Numerical solution of a PDE having boundary conditions

I am solving a PDE using Mathematica. and I would like to know how to implement the condition that the three-variable function u[t, x, z] ...
0
votes
0answers
102 views

How to do this numerical integration via Simpson’s rule?

this is the question. Develop a code to perform a numerical integration for the following functions using Simpson’s rule. You must implement the algorithm in the form of a Module[ ]. Partition the ...
1
vote
1answer
66 views

How can I animate two beads each sliding on its own frictionless rail? [closed]

I am told to animate two beads sliding on rails in Mathematica, but I am very confused on how to get a mass on a rail and it move up and down the rail.
4
votes
3answers
381 views

Dot products and For-loops

I'm taking a class where we're working with matrix applications inside of Mathematica. In this case, we're analyzing senatorial votes that have been numericized so that a value of 1 corresponds to "...
1
vote
1answer
964 views

How to solve Laplace transform question for a system in Mathematica

I know how to use the LaplaceTransform function but am struggling to do this with a system with two ODEs. This is my question: Use Mathematica and the Laplace ...
-6
votes
1answer
89 views

Write a function areaPerimeter[f,g,x] [closed]

Write a function areaPerimeter[f,g,x] which takes as input two polynomials f and g depending on the variable x, and does the following. If the curves y=f(x) and y=g(x) intersect at exactly two ...
0
votes
1answer
104 views

Derive a polygon from the midpoints of the sides of a given polygon [closed]

Write a function that creates a new figure (a new broken line) out of a given broken line. It would take as parameter a list of (max) 20 points representing the closed broken line. The output must be ...
2
votes
2answers
205 views

Euler's method initial value problem — how should I plot the solution?

We are given the following initial value problem: $\qquad y' = t\,e^{3\,t} -2\,y, \quad 0 \le t \le 1, \quad y(0)=0$ Use Euler`s method to approximate the solution to this initial value problem. In ...
3
votes
1answer
197 views

How do I plot a Laplace transform?

I have been looking everywhere for help on this issue and cannot find a solution that works. Here is the assignment. I have figured out how to find the Laplace transform, but I do not know how to ...
1
vote
1answer
82 views

Drawing an approximate visualization of an inequality using ArrayPlot

I need to write a function that returns graphic visualization of the two-dimensional figure described with equation: $\qquad P = \{(x, y) \in R^2: 4+2x < x^2+y^2<9\}$ I have to use the n x n ...
0
votes
0answers
40 views

Finding tangents and curvature of a parametric curve in 3D [duplicate]

I am in a calculus 3 class and cannot figure out how to get Mathematica to solve for unit tangent, normal tangent, binormal tangent, and curvature without getting a supper messy result. This is the ...
0
votes
1answer
89 views

Monte Carlo simulation using modified rejection technique

Plot the probability density function $\qquad w(x)=(1/(1+x^2))(1/x^{0.5})$ for $(0 < x < 1)$ Make up the subroutine flowchart to get the random numbers $x$, using the modified ...
3
votes
2answers
1k views

For Loop and Sum

I am requested to do a sum of the first fifty positive even numbers by using For loop. The For loop that I created is ...
0
votes
1answer
89 views

Interval determination with mathematica [closed]

I am given the solution y=yo/(1-yo x^2). If yo>0, the solution is valid only on ( -1/sqrt(yo), 1/sqrt(yo) ). How is this determined? I need a proof like answer and I need it programmed in ...
0
votes
1answer
89 views

Creating matrices using a Do-loop

Here is an image of current assignment; I am not able to do step 6 to 8 When I try to do the Do-loop, it states that the {i, j} does not have appropriate bounds. ...
1
vote
1answer
42 views

Why are these arrows not plotting?

I'm very new to mathematica, so pardon me for such a simple question. I have tried to follow the syntax of the "Arrow" documentation(https://reference.wolfram.com/language/ref/Arrow.html), but I ...
1
vote
2answers
75 views

How can I make an arrow's shaft more visible?

{Graphics[{Arrowheads[.1], Arrow[{{0, 0}, {2, 1}}]}], Graphics[{Arrowheads[.1], Arrow[BezierCurve[{{0, 0}, {1, 1}, {2, 0}}]]}]} say I have the above code. Can I ...
0
votes
1answer
115 views

Make Arrows Smaller

I have the following program that describes a 3D curve in space with an osculating circle and TNB vectors moving with the curve. The arrows indicating the TNB vectors are way too large making it seem ...
0
votes
0answers
47 views

Devise a compact storage mode

I am writing a code for solving a symmetric band matrix by Cholesky decomposition. I need to store the matrix by defining only the non-zero diagonals of the matrix not the full matrix with band size $...
0
votes
1answer
745 views

How do I plot x as a function of y?

I am new to mathematica so this might so this might be a silly question. Im in cal 2 and im doing this problem: Use cylindrical shells method to find volume of revolution of region bounded by x = ...
1
vote
3answers
222 views

Another way to calculate frequency from Fourier transform

I have some trouble with calculating frequency after Fourier transform. My code: ...
0
votes
1answer
46 views

How to write a command that produces such a matrix that takes n as an argument, where every node has probability 1/m [closed]

Please help in answering the questions above on mathematica. Which commands do I use to answer the question?
0
votes
1answer
92 views

Solving system of equations for coordinates

This is my first time here, so let me know if there's something I need to add to the post etc. Anyway, I need some help with Mathematica and linear algebra, and I got some tips that this would be the ...
3
votes
0answers
68 views

Plotting gradient and newton directions for parametric system of nonlinear ODEs

I have a bucket (system) of chemical kinetics models, a nonlinear dynamical system given by: where kf >= 0 and kr >= 0 are the parameters. The initial conditions are A(0) = B(0) = 1 and C(0) = 0. I'...
0
votes
1answer
322 views

Translating the Newton-Raphson method from Matlab to Mathematica

I am trying to optimize the variables of two (or three depending on how you think about it) matrices using the Newton-Raphson Method. I made the bottom code in Matlab. The code is pretty simple it ...
4
votes
2answers
243 views

How to check whether Laguerre polynomials are orthogonal?

I've got the problem with checking if Laguerre polynomials for n=1,...,10 are orthogonal. I have to create the list of these polynomials, then create the matrix of integrals from 0 to infinity. ...
-2
votes
1answer
372 views

How can I plot a surface in cylindrical coordinates? [closed]

The surface I want to plot is $z^2 + r^2 = 25\, \theta$. Please tell me how to do it in Mathematica.
0
votes
0answers
89 views

Application of ODE

I got to do some assignment for my Student Research. 1. Cat and mouse are in room which is shape in sqare . Cat is in one topic square, mouse in another one. In topic square oposite than cat position ...
-4
votes
2answers
115 views

Basic Supply and Demand Question [closed]

Suppose that the quantity supplied S and the quantity demanded D for the price p of t-shirts are given by the following functions S(p) = −800 + 50p D(p) = 1900−40p Determine the prices for ...
5
votes
1answer
477 views

An efficient way to translate a triple for-loop from Matlab to Mathematica

This is my first post on StackExchange, so if I violate any etiquettes, I apologize in advance. I am a senior engineering student who has been using Mathematica for a year now. For one of my classes, ...

1
2 3 4 5