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
2 votes
0 answers
42 views

DSolve bvlim error due to Boundary condition

I am solving an Ode using Mathematica: $$-p\alpha x^{p-1}=m\ddot{x},\quad x(0)=x_0,\quad x'(0)=x''(0)=0,\quad x(t_1)=0.$$ And I have $p\alpha>0$, all $x$ and $t$ are positive. I want to figure out $...
1 vote
1 answer
144 views

How to draw the images of these six functions in six different coordinate systems at one time as required?

The six functions are as follows: f1[x_] := x Log[x] f2[x_] := x/Log[x] f3[x_] := Log[x]/x f4[x_] := x E^x f5[x_] := x/E^x f6[x_] := E^x/x It is required to draw ...
3 votes
1 answer
202 views

Illustrating the central limit theorem

I'm working on this question is from Wolfram Mathematica online course. I tried my best to find the answer, still not getting it right The question is: Make a list of histograms of 10000 instances of ...
1 vote
3 answers
197 views

How to plot the described figure in mathematica? [closed]

I have had an assignment for which I was supposed to calculate the maximum volume of the figure. I have done it and found my maximum points in the figure. The assignment does not require to plot the ...
1 vote
3 answers
542 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 ...
0 votes
3 answers
72 views

Use the command Select to find all integers x in the list $r=Range[16]$ such that $Mod[x^4,17]=-1$ and also try doing it by cases command

My try: r = Range[16]; Select[r, Mod[x^4,17] = -1] but it doesn't work. How can I do it?
0 votes
0 answers
46 views

How to implement a bellman operator in Mathematica that takes in a matrix & current guess of cost to go, and updates it?

I am currently working on a homework problem (shortest path) that needs to take in a matrix I've created and spits out a cost to go function. We've been given the code in Python but need to change it ...
1 vote
0 answers
112 views

Why is my module saying "cannot assign to raw object" when I run it more than once?

I am trying to solve the shortest path problem in Mathematica. My code looks like this so far. I first import the list. ...
0 votes
0 answers
43 views

How do I build a module that takes in graph data? [duplicate]

This is a homework problem I'm really struggling with. I'm supposed to program the shortest path problem in Mathematica. There are 100 nodes, each node has corresponding distances to 2-3 more nodes. ...
0 votes
1 answer
62 views

How do I utilise distance data from a text file?

I've been given a text file which looks like this - node0, node1 0.04, node8 11.11, node14 72.21 node1, node46 1247.25, node6 20.59, node13 64.94 Where node0 is the first location, and each subsequent ...
-4 votes
1 answer
115 views

Finding solution to fourth order polynomial [closed]

I would have your opinion on this. So, we were assigned some questions to solve using the program Mathematica, but I am not sure how my teacher would like the solution to be presented. Could someone ...
1 vote
2 answers
273 views

How to write more simple variable-step Runge Kutta algorithm to solve this differential equation?

Here is a case of Runge Kutta algorithm with variable-step size: ...
2 votes
1 answer
65 views

Manipulate list

Make a Manipulate to display a column of integer powers with bases from 1 to 25 and exponents from 1 to 10. ...
3 votes
2 answers
105 views

Finding the consecutive distance of n-dimensional points with Mathematica

I want to create a list of (n-dimension, average of points) with 10,000 points per n-dimension. I can't figure out how to take the distance of consecutive points. Say in 2-dimensions, there are 3 ...
0 votes
1 answer
306 views

Histogram Plot Gaussian Distribution

I have to construct functions to obtain random numbers from a Gaussian Distribution with mean $\mu$ and variance $\sigma^2$ by using box-muller method and testing the function by sampling from a ...
-1 votes
1 answer
63 views

A general term of this sequence [closed]

My question is about the set theory. I have c[0]={{1}} and i want to define c[n] as follows: ...
1 vote
1 answer
100 views

How to find the differential equation that has the solution $u=f(x+\frac{y}{z},y+\frac{x}{z})$? [closed]

I should use partial derivatives to find the differential equation that has the following solution: $ u=f(x+\frac{y}{z},y+\frac{x}{z})$.
4 votes
2 answers
250 views

Numbers to binary and back

I am struggling on how to create a function that converts a number into binary and then back. I know there is a built-in function about this BaseForm[] but I am ...
5 votes
2 answers
172 views

How to find each internal angles of an n-sided irregular polygon

The vectors given in problem are: p1 = {1, 2, 2}; p2 = {3, 1, 1/4}; p3 = {2, 3, 9/4}; p4 = {5, 2, 0}; p5 = {3/2, 5/4, 19/16}; Find all 5 of the (internal) ...
1 vote
1 answer
160 views

Homework from studies! - module computation of an approximating function

Polynomial approximation The aim of the task: to write a program in the form of a module in the Mathematica® machine code computation of an approximating function F (·) for an approximated ...
2 votes
2 answers
69 views

Displaying FrameTicks of each function

Plot f(x) = x^3 and g(x) = 10e^(−x^2) on the same graph. Make a frame around the graph, show tick labels on all four sides, plot such that f(x)’s ticks appear on the left side of the plot and g(x)’s ...
-4 votes
2 answers
189 views

Wolfram Mathematica Code please [closed]

Consider two natural numbers of two-digits, like 46 and 96. They have the property that by exchanging the place of their digits and multiplying the so obtained numbers, we get the same product; i.e., <...
-1 votes
1 answer
127 views

Van der Pol's equation [closed]

Consider the van der Pol equation below: (x′′)+c(x^2−1)(x′)+(x)=0 , which governs the flow of current in a vacuum tube with three internal elements. It can be written as the system x′= y , y′= -x-c(x^...
1 vote
0 answers
95 views

Using Runge-Kutta to solve Black Scholes [duplicate]

I am given the Black Scholes equation as $$\frac{\partial c(t, s)}{\partial t}+\frac{1}{2} s^2 \sigma^2 \frac{\partial ^2c(t, s)} {\partial s^2} + r s\frac{\partial c(t, s)}{\partial s} − rc(t, s) = 0 ...
1 vote
1 answer
180 views

Plotting a lefthand Riemann sum

Using Mathematica create a single graph that plots both the function a)$f(x)=\sqrt(x+4)$ on the domain $-4\leq x \leq4$ b) A visualization of a left-hand Riemann sum with 10 rectangles Here is my ...
0 votes
1 answer
590 views

dot product and norm [closed]

Can you solve the following problem in mathematica program? Thank you. Let x=(x1,x2,x3),y=(y1,y2,y3) and ⟨x,y⟩=x1y1+2x2y2+x3y3 be an inner product in a three-dimensional real vector space. Define the ...
1 vote
1 answer
201 views

Lotka-Volterra in mathematica

I have to solve the next problem: We know that a=b=c=d=1 and x0=2,y0=3,q=0.2,On the t=[0,20] interval there is no fishing but on the t=[20,40] interval there is.Show the adequate trajectory(the first ...
1 vote
1 answer
76 views

plot and volume of y^2+z^2=1 cut by the plane y=x and x=1 in the first quadrant

I need to plot and find the volume of y^2+z^2=1 cut by the plane y=x and x=1 in the first quadrant So far, ...
4 votes
2 answers
488 views

Euler-method implementation

How can I implement this pseudocode in Mathematica? Algorithm: ...
0 votes
1 answer
146 views

How to use every number between 2^50 and 2^100 without having to rewrite the code? [closed]

What I have currently written returns a numerical value and stores it in b100. p and q are random integers of size 2^50. I want to use the same code to calculate values where p and q ranges from 2^50 -...
2 votes
0 answers
103 views

How would I use Mathematica to solve this question?

Given the following matrix, A, that corresponds to a particular subset of the world wide web: ...
0 votes
3 answers
141 views

How to use a pure function to write following sum?

How to use a pure function to write following sum? I have tried to use FoldList, but it is still not working.
0 votes
1 answer
527 views

Simpson's 1/3 Rule [closed]

Hi. I'm trying to figure out how to code Simpson's rule in mathematica.
0 votes
1 answer
146 views

Newton's Method plot [closed]

I'm trying to do c. So far I tried, ...
2 votes
2 answers
337 views

center of mass of a 2D square

Using Mathematica, find the center of mass of a 2D square not centered at the origin. center: (x0, y0) ...
6 votes
3 answers
510 views

Particle moving on curve which is the intersection of a surface and a plane

Surface z = 2 x^3 - 5 y^4 Plane z = x + y + 5 Plot A curve is formed by the intersection of the surface and the plane. I ...
-3 votes
1 answer
133 views

Mathematica Linear Regression [closed]

How do I create a user-defined function for linear regression without using the built in function. Essentially doing the steps one by one
1 vote
0 answers
436 views

Calculating double integral bounded by domain in Wolfram Alpha Notebook [closed]

If I want to compute Double Integral on a given region(See attached Picture) How can I input this on Wolfram Alpha Notebook
2 votes
2 answers
290 views

Recreate specific plot in Mathematica

Can anyone help on this ? I did this ...
1 vote
1 answer
303 views

Mirroring the graph on the negative y axis

Another quick question, I have been trying to plot a phase plot, which has resulted in some issues. I know that there is a negative axis which it is also transposed on. However, when I include ...
0 votes
0 answers
75 views

Function to determine number of trees surviving forest fire [duplicate]

How can I write two functions, each of which have as their argument an array mat of 0s (no trees), 1s (trees), 2s (burning trees), that can determine the trees that survived a forest fire, which run ...
0 votes
0 answers
56 views

Writing a function that has two inputs

Write a function called DOTPRODUCT that has two inputs u and v, assumed to be two non-empty lists of numbers of arbitrary length, checks that the two lists are of equal length, prints an error message ...
0 votes
1 answer
57 views

Solve for not y = 0 but for y = n [closed]

Let’s see if I manage to explain this well enough. I need to find roots of an equation(let’s say a quartic) but not at the points where the slope crosses the $x$-axis (y = 0), like the ...
0 votes
0 answers
53 views

Map and Module to convert numerical value to grade [duplicate]

I have an assignment due next week, I've answered all other questions except for this one. I am required to use Module and Map ...
5 votes
4 answers
480 views

Using the Tube function to create a torus from an equation for the curve

I've been searching for an answer for this for a while now, but I can't find anything that deals with using the Tube function to generate a torus from the equation of the torus. The equation of my ...
4 votes
1 answer
134 views

How can I create a randomHop function that would return certain coordinates? [closed]

I've tried to create a function that's equal to a loop containing 4 if functions, one for each integer, but the result would not show the desired outcome. How can I go about doing this question? Write ...
0 votes
2 answers
158 views

How can I find equation of the tangent line for a curve given in polar form? [closed]

Basic calculus Please tell me how to find the tangent at $θ=π/3$ in the form $y=ax+b$ of the curve represented by $r=(r-\cosθ)^2$.
0 votes
1 answer
253 views

How to find an equation of a line using Mathematica [duplicate]

(b) Find an equation of the secant line through $ (−2, f(−2)) $ and $ (−1, f(−1)) $. Define this line as $ fs1(x) $ in Mathematica.
3 votes
1 answer
605 views

Adams-Bashforth method implementation code review

I have a program for Adams-Bashforth method and I want to do some tries to see if it's working properly but I don't know how to do it. My code for AdamsBashforth is ...
3 votes
3 answers
274 views

Get a triangle’s angles from the sides

Hint: For the SSS case, you are given the 3 sides a, b, and c, and need to find the corresponding angles α, β, and γ. To find α, for example, you solve the equation ...

1
2 3 4 5 6